From 3c60b98d6946becd25855e0ed72b8251728d4700 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 21 Feb 2007 19:53:04 +0000 Subject: [PATCH] Fix error when deleting non-attachment items caused by r1195 --- chrome/content/zotero/xpcom/data_access.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/data_access.js b/chrome/content/zotero/xpcom/data_access.js index 0180d2e12..e649ffd18 100644 --- a/chrome/content/zotero/xpcom/data_access.js +++ b/chrome/content/zotero/xpcom/data_access.js @@ -2061,9 +2061,11 @@ Zotero.Item.prototype.erase = function(deleteChildren){ } // Clear fulltext cache - Zotero.Fulltext.clearItemWords(this.getID()); - //Zotero.Fulltext.clearItemContent(this.getID()); - Zotero.Fulltext.purgeUnusedWords(); + if (this.isAttachment()) { + Zotero.Fulltext.clearItemWords(this.getID()); + //Zotero.Fulltext.clearItemContent(this.getID()); + Zotero.Fulltext.purgeUnusedWords(); + } sql = 'DELETE FROM itemCreators WHERE itemID=' + this.getID() + ";\n"; sql += 'DELETE FROM itemNotes WHERE itemID=' + this.getID() + ";\n";