www

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

commit 83dc2e0ad7b297b457dbfe8aa207c7d59c475600
parent 4ad8320dc0bd56de9af15014ab5072c2eea3dddb
Author: Dan Stillman <dstillman@zotero.org>
Date:   Mon,  1 Apr 2013 02:10:39 -0400

Don't fail when $NUMBER is missing in tag color chooser localized string

Diffstat:
Mchrome/content/zotero/tagColorChooser.js | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/chrome/content/zotero/tagColorChooser.js b/chrome/content/zotero/tagColorChooser.js @@ -130,9 +130,15 @@ var Zotero_Tag_Color_Chooser = new function() { num.id = 'number-key'; num.setAttribute('value', parseInt(tagPosition.value) + 1); - instructions.appendChild(document.createTextNode(matches[1])); - instructions.appendChild(num); - instructions.appendChild(document.createTextNode(matches[2])); + if (matches) { + instructions.appendChild(document.createTextNode(matches[1])); + instructions.appendChild(num); + instructions.appendChild(document.createTextNode(matches[2])); + } + // If no $NUMBER variable in translated string, fail as gracefully as possible + else { + instructions.appendChild(document.createTextNode(msg)); + } };