Remove debug line and tweak whitespace/style

This commit is contained in:
Dan Stillman 2016-12-15 00:27:16 -05:00
parent cff74484be
commit 50df62a0e7
3 changed files with 10 additions and 9 deletions

View file

@ -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];
}
}

View file

@ -1567,7 +1567,8 @@ Zotero.Translate.Base.prototype = {
}
}
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];
@ -1596,9 +1597,9 @@ Zotero.Translate.Base.prototype = {
this._savingItems -= items.length;
this.newItems = this.newItems.concat(newItems);
this._checkIfDone();
}.bind(this)).catch(function(e) {
}.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));