diff --git a/chrome/content/zotero/xpcom/data/dataObjects.js b/chrome/content/zotero/xpcom/data/dataObjects.js index 9167b8421..b701142a1 100644 --- a/chrome/content/zotero/xpcom/data/dataObjects.js +++ b/chrome/content/zotero/xpcom/data/dataObjects.js @@ -275,6 +275,9 @@ Zotero.DataObjects = function (object, objectPlural, id, table) { this.getIDFromLibraryAndKey = function (libraryID, key) { + if (libraryID === null) { + throw new Error("libraryID cannot be NULL (did you mean 0?)"); + } return (this._objectIDs[libraryID] && this._objectIDs[libraryID][key]) ? this._objectIDs[libraryID][key] : false; }