Fix corrupt citation prompt going into recursive loop
This commit is contained in:
parent
8d3e893aec
commit
a12b997b8a
|
@ -2211,7 +2211,6 @@ Zotero.Integration.CitationField = class extends Zotero.Integration.Field {
|
||||||
}
|
}
|
||||||
|
|
||||||
resolveCorrupt(code) {
|
resolveCorrupt(code) {
|
||||||
return Zotero.Promise.coroutine(function* () {
|
|
||||||
Zotero.debug(`Integration: handling corrupt citation field ${code}`);
|
Zotero.debug(`Integration: handling corrupt citation field ${code}`);
|
||||||
var msg = Zotero.getString("integration.corruptField")+'\n\n'+
|
var msg = Zotero.getString("integration.corruptField")+'\n\n'+
|
||||||
Zotero.getString('integration.corruptField.description');
|
Zotero.getString('integration.corruptField.description');
|
||||||
|
@ -2226,16 +2225,10 @@ Zotero.Integration.CitationField = class extends Zotero.Integration.Field {
|
||||||
var fieldGetter = Zotero.Integration.currentSession.fields,
|
var fieldGetter = Zotero.Integration.currentSession.fields,
|
||||||
oldWindow = Zotero.Integration.currentWindow,
|
oldWindow = Zotero.Integration.currentWindow,
|
||||||
oldProgressCallback = this.progressCallback;
|
oldProgressCallback = this.progressCallback;
|
||||||
// Display reselect edit citation dialog
|
// Clear current code and subsequent addEditCitation dialog will be the reselection
|
||||||
let [idx, field, citation] = yield fieldGetter.addEditCitation(this);
|
this.clearCode();
|
||||||
if (Zotero.Integration.currentWindow && !Zotero.Integration.currentWindow.closed) {
|
return this.unserialize();
|
||||||
Zotero.Integration.currentWindow.close();
|
|
||||||
}
|
}
|
||||||
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) {
|
resolveCorrupt(code) {
|
||||||
return Zotero.Promise.coroutine(function* () {
|
|
||||||
Zotero.debug(`Integration: handling corrupt bibliography field ${code}`);
|
Zotero.debug(`Integration: handling corrupt bibliography field ${code}`);
|
||||||
var msg = Zotero.getString("integration.corruptBibliography")+'\n\n'+
|
var msg = Zotero.getString("integration.corruptBibliography")+'\n\n'+
|
||||||
Zotero.getString('integration.corruptBibliography.description');
|
Zotero.getString('integration.corruptBibliography.description');
|
||||||
|
@ -2267,7 +2259,6 @@ Zotero.Integration.BibliographyField = class extends Zotero.Integration.Field {
|
||||||
this.clearCode();
|
this.clearCode();
|
||||||
return unserialize();
|
return unserialize();
|
||||||
}
|
}
|
||||||
}).apply(this, arguments);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user