www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 13c4bbebfae3cc5fc3b3a0db6ba3b396051c1bdc
parent 877063e73dfb8cdaa0db49005e18cf7ba0d938f2
Author: Dan Stillman <dstillman@zotero.org>
Date:   Fri, 29 Apr 2016 20:25:11 -0400

Save master item when merging

Diffstat:
Mchrome/content/zotero/xpcom/data/items.js | 2+-
Mtest/tests/itemsTest.js | 1+
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/data/items.js b/chrome/content/zotero/xpcom/data/items.js @@ -741,7 +741,7 @@ Zotero.Items = function() { var replPred = Zotero.Relations.replacedItemPredicate; var toSave = {}; - toSave[this.id]; + toSave[item.id] = item; for each(var otherItem in otherItems) { let otherItemURI = Zotero.URI.getItemURI(otherItem); diff --git a/test/tests/itemsTest.js b/test/tests/itemsTest.js @@ -27,6 +27,7 @@ describe("Zotero.Items", function () { assert.isTrue(item2.deleted); // Check for merge-tracking relation + assert.isFalse(item1.hasChanged()); var rels = item1.getRelationsByPredicate(Zotero.Relations.replacedItemPredicate); assert.lengthOf(rels, 1); assert.equal(rels[0], item2URI);