www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 64701de5f95808e25d45dffde73725de468cb8e3
parent 03072e363d72d6e0f14561da4ad55b083b5b69bc
Author: Simon Kornblith <simon@simonster.com>
Date:   Tue,  1 May 2012 09:54:10 -0400

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

Diffstat:
Mchrome/content/zotero/xpcom/integration.js | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js @@ -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);