Don't log warning when opening a PDF for the first time

"Setting contains an invalid attachment page index ('null') -- discarding"

Fixes #1973
This commit is contained in:
Dan Stillman 2021-03-07 02:19:27 -05:00
parent 6e49da1452
commit 3af4793f7f

View file

@ -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;
}