Avoid console error if page closed before translators are available

Was showing up in some test runs
This commit is contained in:
Dan Stillman 2016-11-20 01:31:47 -05:00
parent 6d07cb44df
commit aeaa0d12c7

View file

@ -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) {