Don't fail if user cancels setDocPrefs window that appears because a style doesn't exist
This commit is contained in:
parent
03072e363d
commit
64701de5f9
1 changed files with 5 additions and 1 deletions
|
@ -930,7 +930,11 @@ Zotero.Integration.Document.prototype._getSession = function(require, dontRunSet
|
|||
// make sure style is defined
|
||||
if(e instanceof Zotero.Integration.DisplayException && e.name === "invalidStyle") {
|
||||
this._session.setDocPrefs(this._doc, this._app.primaryFieldType,
|
||||
this._app.secondaryFieldType, function() {
|
||||
this._app.secondaryFieldType, function(status) {
|
||||
if(status === false) {
|
||||
throw new Zotero.Integration.UserCancelledException();
|
||||
}
|
||||
|
||||
me._doc.setDocumentData(me._session.data.serializeXML());
|
||||
me._session.reload = true;
|
||||
callback(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue