From aeaa0d12c72e8a1befdb22d8f526c61daacb85b7 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 20 Nov 2016 01:31:47 -0500 Subject: [PATCH] Avoid console error if page closed before translators are available Was showing up in some test runs --- chrome/content/zotero/browser.js | 1 + 1 file changed, 1 insertion(+) diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js index df01f81ee..96695a22c 100644 --- a/chrome/content/zotero/browser.js +++ b/chrome/content/zotero/browser.js @@ -980,6 +980,7 @@ Zotero_Browser.Tab.prototype._selectItems = function(obj, itemList, callback) { */ Zotero_Browser.Tab.prototype._translatorsAvailable = Zotero.Promise.coroutine(function* (translate, translators) { var page = this.getPageObject(); + if (!page) return; page.saveEnabled = true; if(translators && translators.length) {