diff --git a/chrome/content/zotero/xpcom/data/dataObjects.js b/chrome/content/zotero/xpcom/data/dataObjects.js index 624e705188..7426e453bf 100644 --- a/chrome/content/zotero/xpcom/data/dataObjects.js +++ b/chrome/content/zotero/xpcom/data/dataObjects.js @@ -177,6 +177,9 @@ Zotero.DataObjects.prototype.getAsync = Zotero.Promise.coroutine(function* (ids, toReturn.push(this._objectCache[id]); } else { + if (!ids.every(id => Number.isInteger(id))) { + throw new Error(`Invalid ${this._ZDO_object} ID '${id}'`); + } toLoad.push(id); } }