Don't fail if user cancels setDocPrefs window that appears because a style doesn't exist

This commit is contained in:
Simon Kornblith 2012-05-01 09:54:10 -04:00
parent 03072e363d
commit 64701de5f9

View file

@ -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);