www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit cfbb3d3d4717347e407fca0f7547ce99317f8842
parent bd5f2525dc9af537444935df99886e467ddcd4f2
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon, 11 Jun 2018 12:16:09 -0400

Mendeley import: Fix "Collection undefined not found" error

If a folder appeared in the DocumentFolders table but not in
Folders/RemoteFolders, it caused an error.

Diffstat:
Mchrome/content/zotero/import/mendeley/mendeleyImport.js | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/import/mendeley/mendeleyImport.js b/chrome/content/zotero/import/mendeley/mendeleyImport.js @@ -428,7 +428,12 @@ 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)); + let key = folderKeys.get(row.folderId); + if (!key) { + Zotero.debug(`Document folder ${row.folderId} not found -- skipping`, 2); + continue; + } + keys.push(key); map.set(row.documentId, keys); } return map;