Mendeley import: Fix "keys is undefined" error

An error would occur if a document existed in RemoteDocuments but not
Documents.
This commit is contained in:
Dan Stillman 2018-06-10 02:49:17 -04:00
parent 8547dedca9
commit 2831e8be3e

View file

@ -427,6 +427,7 @@ Zotero_Import_Mendeley.prototype._getDocumentCollections = async function (group
);
for (let row of rows) {
let keys = map.get(row.documentId);
if (!keys) keys = [];
keys.push(folderKeys.get(row.folderId));
map.set(row.documentId, keys);
}