Avoid console error if page closed before translators are available
Was showing up in some test runs
This commit is contained in:
parent
6d07cb44df
commit
aeaa0d12c7
|
@ -980,6 +980,7 @@ Zotero_Browser.Tab.prototype._selectItems = function(obj, itemList, callback) {
|
||||||
*/
|
*/
|
||||||
Zotero_Browser.Tab.prototype._translatorsAvailable = Zotero.Promise.coroutine(function* (translate, translators) {
|
Zotero_Browser.Tab.prototype._translatorsAvailable = Zotero.Promise.coroutine(function* (translate, translators) {
|
||||||
var page = this.getPageObject();
|
var page = this.getPageObject();
|
||||||
|
if (!page) return;
|
||||||
page.saveEnabled = true;
|
page.saveEnabled = true;
|
||||||
|
|
||||||
if(translators && translators.length) {
|
if(translators && translators.length) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user