From 3af4793f7f60410bfa6fa20e8f8fa2333172c5f5 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 7 Mar 2021 02:19:27 -0500 Subject: [PATCH] Don't log warning when opening a PDF for the first time "Setting contains an invalid attachment page index ('null') -- discarding" Fixes #1973 --- chrome/content/zotero/xpcom/data/item.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index 94ea640532..615c67fcf8 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -3297,7 +3297,7 @@ Zotero.Item.prototype.getAttachmentLastPageIndex = function () { var id = this._getLastPageIndexSettingKey(); var val = Zotero.SyncedSettings.get(Zotero.Libraries.userLibraryID, id); - if (val !== null && typeof val != 'number' || val != parseInt(val)) { + if (val !== null && (typeof val != 'number' || val != parseInt(val))) { Zotero.logError(`Setting contains an invalid attachment page index ('${val}') -- discarding`); return null; }