www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 50df62a0e701bedb75386ab137015f407acbfed7
parent cff74484be160406de70023112dd67647a555e2f
Author: Dan Stillman <dstillman@zotero.org>
Date:   Thu, 15 Dec 2016 00:27:16 -0500

Remove debug line and tweak whitespace/style

Diffstat:
Mchrome/content/zotero/xpcom/connector/connector.js | 2+-
Mchrome/content/zotero/xpcom/connector/translator.js | 6+++---
Mchrome/content/zotero/xpcom/translation/translate.js | 11++++++-----
3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/chrome/content/zotero/xpcom/connector/connector.js b/chrome/content/zotero/xpcom/connector/connector.js @@ -181,7 +181,7 @@ Zotero.Connector = new function() { } else { val = req.responseText; } - } + } if(req.status == 0 || req.status >= 400) { Zotero.debug("Connector: Method "+method+" failed with status "+req.status); if(callback) callback(false, req.status, val); diff --git a/chrome/content/zotero/xpcom/connector/translator.js b/chrome/content/zotero/xpcom/connector/translator.js @@ -257,12 +257,12 @@ Zotero.Translators = new function() { } } - let deletedTranslators = Object.keys(_translators).filter((ID) => !existingTranslatorIDs.has(ID)); + let deletedTranslators = Object.keys(_translators).filter(id => !existingTranslatorIDs.has(id)); if (deletedTranslators.length) { hasChanged = true; - for (let ID of deletedTranslators) { + for (let id of deletedTranslators) { Zotero.debug(`Translators: Removing ${_translators[ID].label}`); - delete _translators[ID]; + delete _translators[id]; } } diff --git a/chrome/content/zotero/xpcom/translation/translate.js b/chrome/content/zotero/xpcom/translation/translate.js @@ -1564,10 +1564,11 @@ Zotero.Translate.Base.prototype = { // Defer until after we fire the itemDone event deferredProgress.push([attachment, progress, error]); attachmentsWithProgress.push(attachment); - } + } } - return this._itemSaver.saveItems(items.slice(), attachmentCallback.bind(this)).then(function(newItems) { + return this._itemSaver.saveItems(items.slice(), attachmentCallback.bind(this)) + .then(function(newItems) { // Remove attachments not being saved from item.attachments for(var i=0; i<items.length; i++) { var item = items[i]; @@ -1595,10 +1596,10 @@ Zotero.Translate.Base.prototype = { this._savingItems -= items.length; this.newItems = this.newItems.concat(newItems); - this._checkIfDone(); - }.bind(this)).catch(function(e) { + this._checkIfDone(); + }.bind(this)) + .catch(function(e) { this._savingItems -= items.length; - Zotero.debug("REDUCING SAVING ITEMS ERROR TO " + this._savingItems); Zotero.logError(e); this.complete(false, e); }.bind(this));