Fix corrupt citation prompt going into recursive loop

This commit is contained in:
Adomas Venčkauskas 2018-03-19 11:36:53 +02:00
parent 8d3e893aec
commit a12b997b8a

View File

@ -2211,7 +2211,6 @@ Zotero.Integration.CitationField = class extends Zotero.Integration.Field {
}
resolveCorrupt(code) {
return Zotero.Promise.coroutine(function* () {
Zotero.debug(`Integration: handling corrupt citation field ${code}`);
var msg = Zotero.getString("integration.corruptField")+'\n\n'+
Zotero.getString('integration.corruptField.description');
@ -2226,16 +2225,10 @@ Zotero.Integration.CitationField = class extends Zotero.Integration.Field {
var fieldGetter = Zotero.Integration.currentSession.fields,
oldWindow = Zotero.Integration.currentWindow,
oldProgressCallback = this.progressCallback;
// Display reselect edit citation dialog
let [idx, field, citation] = yield fieldGetter.addEditCitation(this);
if (Zotero.Integration.currentWindow && !Zotero.Integration.currentWindow.closed) {
Zotero.Integration.currentWindow.close();
// Clear current code and subsequent addEditCitation dialog will be the reselection
this.clearCode();
return this.unserialize();
}
Zotero.Integration.currentWindow = oldWindow;
fieldGetter.progressCallback = oldProgressCallback;
return citation;
}
}).apply(this, arguments);
}
};
@ -2256,7 +2249,6 @@ Zotero.Integration.BibliographyField = class extends Zotero.Integration.Field {
}
resolveCorrupt(code) {
return Zotero.Promise.coroutine(function* () {
Zotero.debug(`Integration: handling corrupt bibliography field ${code}`);
var msg = Zotero.getString("integration.corruptBibliography")+'\n\n'+
Zotero.getString('integration.corruptBibliography.description');
@ -2267,7 +2259,6 @@ Zotero.Integration.BibliographyField = class extends Zotero.Integration.Field {
this.clearCode();
return unserialize();
}
}).apply(this, arguments);
}
};