From c1672e4d4e7429db88719e6e863574e5dfb552d7 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Fri, 27 Jan 2012 15:37:02 -0500 Subject: [PATCH] Fix inserting first citation, broken by b526a7 --- chrome/content/zotero/xpcom/integration.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index 85f9a238ef..c180649d4d 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1615,7 +1615,7 @@ Zotero.Integration.Session.prototype.resetRequest = function(doc) { Zotero.Integration.Session.prototype.setData = function(data) { var oldStyle = (this.data && this.data.style ? this.data.style : false); this.data = data; - if(!oldStyle || (data.style.styleID && oldStyle.styleID != data.style.styleID)) { + if(data.style.styleID && (!oldStyle || oldStyle.styleID != data.style.styleID)) { this.styleID = data.style.styleID; try { var getStyle = Zotero.Styles.get(data.style.styleID); @@ -1631,7 +1631,7 @@ Zotero.Integration.Session.prototype.setData = function(data) { } return true; - } else { + } else if(oldStyle) { data.style = oldStyle; } return false;