Skip to content

Commit 21b751e

Browse files
Omikhleiaalerque
authored andcommitted
fix(packages): Correct error handling the locator on some CSL styles
1 parent d8386ab commit 21b751e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/bibtex/csl/engine.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,8 @@ function CslEngine:_text (options, content, entry)
472472
t = entry[variable]
473473
self:_addGroupVariable(variable, t)
474474
if variable == "locator" then
475+
variable = t and t.label
475476
t = t and t.value
476-
variable = entry.locator.label
477477
end
478478
if variable == "page" and t then
479479
-- Replace any dash in page ranges
@@ -732,6 +732,7 @@ function CslEngine:_number (options, content, entry)
732732
local value = entry[variable]
733733
self:_addGroupVariable(variable, value)
734734
if variable == "locator" then -- special case
735+
variable = value and value.label
735736
value = value and value.value
736737
end
737738
if value then

0 commit comments

Comments
 (0)