diff --git a/chrome/content/zotero/tagColorChooser.js b/chrome/content/zotero/tagColorChooser.js index 3ee3f6d3e..d30e2b594 100644 --- 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)); + } };