Don't jump to library tab when closing tab after startup

Fixes #2362
This commit is contained in:
Martynas Bagdonas 2022-02-21 18:43:04 +02:00
parent 822f821718
commit b71367760d

View file

@ -121,6 +121,8 @@ var Zotero_Tabs = new function () {
}
}
}
// Unset the previously selected tab id, because it was set when restoring tabs
this._prevSelectedID = null;
};
/**
@ -136,7 +138,6 @@ var Zotero_Tabs = new function () {
*/
this.add = function ({ type, data, title, index, select, onClose }) {
if (typeof type != 'string') {
throw new Error(`'type' should be a string (was ${typeof type})`);
}
if (typeof title != 'string') {
throw new Error(`'title' should be a string (was ${typeof title})`);