From 5bc3bf7a8605edc4030b79dcd701dfe33f9afc2d Mon Sep 17 00:00:00 2001 From: Nicolas Casajus Date: Thu, 3 Oct 2024 14:05:04 +0200 Subject: [PATCH] fix issue when field is not available --- R/get-zotero-data.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/R/get-zotero-data.R b/R/get-zotero-data.R index 5dd0a92..fb256a9 100644 --- a/R/get-zotero-data.R +++ b/R/get-zotero-data.R @@ -140,6 +140,8 @@ get_zotero_data <- function(path = "~/zotero") { "abstract", "volume", "issue", "pages", "publisher", "place", "institution", "doi", "url", "note") + col_order <- col_order[col_order %in% colnames(items)] + items <- items[ , col_order]