commit 19447e7b90914d80d1fe10e03f6a20974d674c7c
parent a455a7253491af9d61502a3b6c36f4e76c0f00e0
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 22 Sep 2017 04:12:07 -0400
Fix RIS/BibTeX import errors when in library root
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/server_connector.js b/chrome/content/zotero/xpcom/server_connector.js
@@ -646,7 +646,7 @@ Zotero.Server.Connector.Import.prototype = {
var { library, collection, editable } = Zotero.Server.Connector.getSaveTarget();
let arg = {};
if (editable) {
- arg = {libraryID: library.libraryID, collections: [collection.id]};
+ arg = { libraryID: library.libraryID, collections: collection ? [collection.id] : null };
}
let items = yield translate.translate(arg);
return [201, "application/json", JSON.stringify(items)];