From 50df62a0e701bedb75386ab137015f407acbfed7 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 15 Dec 2016 00:27:16 -0500 Subject: [PATCH] Remove debug line and tweak whitespace/style --- chrome/content/zotero/xpcom/connector/connector.js | 2 +- chrome/content/zotero/xpcom/connector/translator.js | 6 +++--- chrome/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 index 065a752d9c..225b941a77 100644 --- 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 index 078af85731..f7ab31dfdd 100644 --- 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 index 6a866bcbb6..76b77a760e 100644 --- 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