From 1ab118c9afc384cca647e3b5e245b84e3ace839e Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 15 Sep 2008 19:54:09 +0000 Subject: [PATCH] Don't throw error if there's no Zotero.Styles.lastCSL --- chrome/content/zotero/xpcom/cite.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/cite.js b/chrome/content/zotero/xpcom/cite.js index 9457cd6f2..efd66759c 100644 --- a/chrome/content/zotero/xpcom/cite.js +++ b/chrome/content/zotero/xpcom/cite.js @@ -172,7 +172,8 @@ Zotero.Style.prototype.__defineGetter__("csl", */ function() { // cache last style - if(Zotero.Styles.cacheTranslatorData && Zotero.Styles.lastCSL.styleID == this.styleID) { + if(Zotero.Styles.cacheTranslatorData && Zotero.Styles.lastCSL && + Zotero.Styles.lastCSL.styleID == this.styleID) { return Zotero.Styles.lastCSL; }