Remove debug line and tweak whitespace/style
This commit is contained in:
parent
cff74484be
commit
50df62a0e7
3 changed files with 10 additions and 9 deletions
|
@ -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);
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue