diff --git a/chrome/content/zotero/xpcom/citeproc.js b/chrome/content/zotero/xpcom/citeproc.js index 4ff828418..32a1c5e17 100644 --- a/chrome/content/zotero/xpcom/citeproc.js +++ b/chrome/content/zotero/xpcom/citeproc.js @@ -2641,21 +2641,20 @@ CSL.Engine.prototype.remapSectionVariable = function (inputList) { } else if (item && item.locator && this.opt.development_extensions.static_statute_locator) { - value = "" + item.locator; - var splt = value.split(/\s+/); + var splt = item.locator.split(/\s+/); if (CSL.STATUTE_SUBDIV_STRINGS[splt[0]]) { item.label = CSL.STATUTE_SUBDIV_STRINGS[splt[0]]; } else if (item.label) { - value = CSL.STATUTE_SUBDIV_STRINGS_REVERSE[item.label] + " " + value; + item.locator = CSL.STATUTE_SUBDIV_STRINGS_REVERSE[item.label] + " " + item.locator; } else { item.label = "page"; - value = "p. " + value; + item.locator = "p. " + item.locator; } } - if (!later_label) { - later_label = item.label; - } if (value) { + if (!later_label) { + later_label = item.label; + } var m = value.match(CSL.STATUTE_SUBDIV_GROUPED_REGEX); item.section_label_count = m.length; var locator = "";