From 2a33ede284053411145d825411daf453648f8958 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Thu, 2 May 2013 14:46:35 -0400 Subject: [PATCH] Fix innocuous error installing a style Installing a style could throw an error if the preferences were open and the styles pane had not yet been selected, although the style would be successfully installed. See https://forums.zotero.org/discussion/29250/importing-a-new-style/ --- chrome/content/zotero/xpcom/style.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/style.js b/chrome/content/zotero/xpcom/style.js index 1484c2f79e..e3ade24a67 100644 --- a/chrome/content/zotero/xpcom/style.js +++ b/chrome/content/zotero/xpcom/style.js @@ -382,7 +382,9 @@ Zotero.Styles = new function() { var enumerator = wm.getEnumerator("zotero:pref"); while(enumerator.hasMoreElements()) { var win = enumerator.getNext(); - win.Zotero_Preferences.Cite.refreshStylesList(styleID); + if(win.Zotero_Preferences.Cite) { + win.Zotero_Preferences.Cite.refreshStylesList(styleID); + } } }); }