From 091c3227d95c9c918a11ad1251bfd15e3ce315d4 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 5 May 2009 05:17:04 +0000 Subject: [PATCH] Fix "TypeError: cases[l].indexOf is not a function" upgrade error --- chrome/content/zotero/xpcom/schema.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 7213b3832..6e641ce00 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -1806,7 +1806,7 @@ Zotero.Schema = new function(){ if (tags) { // Find tags with multiple case forms for each(var row in tags) { - var l = row.tag.toLowerCase(); + var l = '_' + row.tag.toLowerCase(); if (!cases[l]) { cases[l] = []; } @@ -1817,14 +1817,15 @@ Zotero.Schema = new function(){ var done = {}; for each(var row in tags) { var l = row.tag.toLowerCase(); + var lk = '_' + l; - if (done[l]) { + if (done[lk]) { continue; } - done[l] = true; + done[lk] = true; // Only one tag -- use - if (cases[l].length == 1) { + if (cases[lk].length == 1) { newTags.push(row); continue; }