Skip to content

Commit

Permalink
Remove debug line and tweak whitespace/style
Browse files Browse the repository at this point in the history
  • Loading branch information
dstillman committed Dec 15, 2016
1 parent cff7448 commit 50df62a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion chrome/content/zotero/xpcom/connector/connector.js
Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions chrome/content/zotero/xpcom/connector/translator.js
Expand Up @@ -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];
}
}

Expand Down
11 changes: 6 additions & 5 deletions chrome/content/zotero/xpcom/translation/translate.js
Expand Up @@ -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];
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 50df62a

Please sign in to comment.