Fix "TypeError: cases[l].indexOf is not a function" upgrade error
This commit is contained in:
parent
b99bcff855
commit
091c3227d9
|
@ -1806,7 +1806,7 @@ Zotero.Schema = new function(){
|
||||||
if (tags) {
|
if (tags) {
|
||||||
// Find tags with multiple case forms
|
// Find tags with multiple case forms
|
||||||
for each(var row in tags) {
|
for each(var row in tags) {
|
||||||
var l = row.tag.toLowerCase();
|
var l = '_' + row.tag.toLowerCase();
|
||||||
if (!cases[l]) {
|
if (!cases[l]) {
|
||||||
cases[l] = [];
|
cases[l] = [];
|
||||||
}
|
}
|
||||||
|
@ -1817,14 +1817,15 @@ Zotero.Schema = new function(){
|
||||||
var done = {};
|
var done = {};
|
||||||
for each(var row in tags) {
|
for each(var row in tags) {
|
||||||
var l = row.tag.toLowerCase();
|
var l = row.tag.toLowerCase();
|
||||||
|
var lk = '_' + l;
|
||||||
|
|
||||||
if (done[l]) {
|
if (done[lk]) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
done[l] = true;
|
done[lk] = true;
|
||||||
|
|
||||||
// Only one tag -- use
|
// Only one tag -- use
|
||||||
if (cases[l].length == 1) {
|
if (cases[lk].length == 1) {
|
||||||
newTags.push(row);
|
newTags.push(row);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user