From 6e38c368042843a2b6527019b794fedb8590bec2 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 7 Mar 2020 03:38:10 -0500 Subject: [PATCH] Don't update Extra field if missing in fromJSON() Harmless regression from recent changes --- chrome/content/zotero/xpcom/data/item.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js index b303a2507c..f5a1fed28c 100644 --- a/chrome/content/zotero/xpcom/data/item.js +++ b/chrome/content/zotero/xpcom/data/item.js @@ -4423,7 +4423,9 @@ Zotero.Item.prototype.fromJSON = function (json, options = {}) { } } - this.setField('extra', Zotero.Utilities.Internal.combineExtraFields(extra, extraFields)); + if (extra || extraFields.size || this.getField('extra')) { + this.setField('extra', Zotero.Utilities.Internal.combineExtraFields(extra, extraFields)); + } if (json.collections || this._collections.length) { this.setCollections(json.collections);