Merge pull request #595 from aurimasv/dup-isbn
Fix duplicate matching when ISBN is non-sensical
This commit is contained in:
commit
67f28eada3
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user