Fix regression for broken "Snow in Page"

Fixes #2764
Regression from 7ec54fd
This commit is contained in:
Martynas Bagdonas 2022-08-18 10:09:09 +03:00
parent 96c4427d6c
commit fa32eb6790

View file

@ -1369,7 +1369,9 @@ class Reader {
this.triggerAnnotationsImportCheck(itemID);
let reader;
if (!allowDuplicate) {
// If duplicating is not allowed, and no reader instance is loaded for itemID,
// try to find an unloaded tab and select it. Zotero.Reader.open will then be called again
if (!allowDuplicate && !this._readers.find(r => r._itemID === itemID)) {
let win = Zotero.getMainWindow();
if (win) {
let existingTabID = win.Zotero_Tabs.getTabIDByItemID(itemID);