Save master item when merging
This commit is contained in:
parent
877063e73d
commit
13c4bbebfa
2 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue