commit a91957c588830e9528150225442309b39c837aa2
parent c6444c29de9d779886f9bfa807c941b2103718d1
Author: Dan Stillman <dstillman@zotero.org>
Date: Sun, 24 Apr 2016 02:44:21 -0400
Fix #956, 5.0: Merging of duplicate items is not working
Diffstat:
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/data/relations.js b/chrome/content/zotero/xpcom/data/relations.js
@@ -149,7 +149,8 @@ Zotero.Relations = new function () {
this.getByObject = function (objectType, object) {
var objectsClass = Zotero.DataObjectUtilities.getObjectsClassForObjectType(objectType);
var predicateIDs = [];
- var o = _subjectPredicatesByObject[objectType][object];
+ var o = _subjectPredicatesByObject[objectType]
+ ? _subjectPredicatesByObject[objectType][object] : false;
if (!o) {
return [];
}
diff --git a/test/tests/duplicatesTest.js b/test/tests/duplicatesTest.js
@@ -3,6 +3,12 @@
describe("Duplicate Items", function () {
var win, zp, cv;
+ before(function* () {
+ yield resetDB({
+ thisArg: this,
+ skipBundledFiles: true
+ });
+ });
beforeEach(function* () {
Zotero.Prefs.clear('duplicateLibraries');
win = yield loadZoteroPane();