Fix error in Mendeley import (regression from 8fc316f727
)
"Zotero.Relations.getByPredicateAndObject(...).filter is not a function"
This commit is contained in:
parent
bb8325ff9b
commit
6b626ba992
1 changed files with 2 additions and 2 deletions
|
@ -314,7 +314,7 @@ Zotero_Import_Mendeley.prototype._findExistingCollection = async function (libra
|
|||
var predicate = 'mendeleyDB:remoteFolderUUID';
|
||||
var uuid = collectionJSON.relations[predicate];
|
||||
|
||||
var collections = await Zotero.Relations.getByPredicateAndObject('collection', predicate, uuid)
|
||||
var collections = (await Zotero.Relations.getByPredicateAndObject('collection', predicate, uuid))
|
||||
.filter((c) => {
|
||||
if (c.libraryID != libraryID) {
|
||||
return false;
|
||||
|
@ -963,7 +963,7 @@ Zotero_Import_Mendeley.prototype._findExistingItem = async function (libraryID,
|
|||
|
||||
|
||||
Zotero_Import_Mendeley.prototype._getItemByRelation = async function (libraryID, predicate, object) {
|
||||
var items = await Zotero.Relations.getByPredicateAndObject('item', predicate, object)
|
||||
var items = (await Zotero.Relations.getByPredicateAndObject('item', predicate, object))
|
||||
.filter(item => item.libraryID == libraryID && !item.deleted);
|
||||
if (!items.length) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue