From 71d636e8fb18a31c617544899c8df6f7f31c71f0 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 4 Jun 2017 21:35:54 -0400 Subject: [PATCH] Make non-integer id passed to getAsync() non-fatal for now Follow-up to 4e1937680f7 --- chrome/content/zotero/xpcom/data/dataObjects.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/dataObjects.js b/chrome/content/zotero/xpcom/data/dataObjects.js index 68b90f4a7..114ba427c 100644 --- a/chrome/content/zotero/xpcom/data/dataObjects.js +++ b/chrome/content/zotero/xpcom/data/dataObjects.js @@ -174,7 +174,10 @@ Zotero.DataObjects.prototype.getAsync = Zotero.Promise.coroutine(function* (ids, let id = ids[i]; if (!Number.isInteger(id)) { - throw new Error(`Invalid ${this._ZDO_object} ID '${id}' (${typeof id})`); + // TEMP + Zotero.logError(`${this._ZDO_object} ID '${id}' is not an integer (${typeof id})`); + id = parseInt(id); + //throw new Error(`${this._ZDO_object} ID '${id}' is not an integer (${typeof id})`); } // Check if already loaded