From d8079dac9bcdeb5f45cfac9e3bf646ca57263e44 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 3 Jun 2008 19:52:50 +0000 Subject: [PATCH] Fixes #1029, Error when a bibliography with customized entries references a non-existent item --- chrome/content/zotero/xpcom/integration.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index f37131931..2c4ca7a76 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -1072,6 +1072,9 @@ Zotero.Integration.Session.prototype.loadDocumentData = function(json) { if(documentData.custom) { for(var itemID in documentData.custom) { var item = this.itemSet.getItemsByIds([itemID])[0]; + if (!item) { + continue; + } item.setProperty("bibliography-Integration", documentData.custom[itemID]); } }