Save master item when merging

This commit is contained in:
Dan Stillman 2016-04-29 20:25:11 -04:00
parent 877063e73d
commit 13c4bbebfa
2 changed files with 2 additions and 1 deletions

View file

@ -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);

View file

@ -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);