www

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

commit 2f79cb221f8dfeba2f00ea775df11e376eebe96f
parent ee389f106e3e055bb0b7954d17b5c19b77d4bb13
Author: Aurimas Vinckevicius <aurimas.dev@gmail.com>
Date:   Wed, 10 Dec 2014 15:59:26 -0600

Fix duplicate matching when ISBN is non-sensical
Re https://forums.zotero.org/discussion/43046/items-mistakenly-identified-as-duplicates/

Diffstat:
Mchrome/content/zotero/xpcom/duplicates.js | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/xpcom/duplicates.js b/chrome/content/zotero/xpcom/duplicates.js @@ -170,7 +170,9 @@ Zotero.Duplicates.prototype._findDuplicates = function () { } // If no comparison function, check for exact match else { - if (rows[i].value !== rows[j].value) { + if (!rows[i].value || !rows[j].value + || (rows[i].value !== rows[j].value) + ) { break; } } @@ -205,8 +207,8 @@ Zotero.Duplicates.prototype._findDuplicates = function () { var isbnCache = {}; if (rows) { for each(var row in rows) { - row.value = (row.value+'').replace(/[^\dX]+/ig, '').toUpperCase(); //ignore formatting - isbnCache[row.itemID] = row.value; + row.value = Zotero.Utilities.cleanISBN('' + row.value); + if (row.value) isbnCache[row.itemID] = row.value; } rows.sort(sortByValue); processRows();