From 0dfb7e26e14f646b7d6229ff769a24ef5da7ac38 Mon Sep 17 00:00:00 2001 From: Jonathan Harker Date: Tue, 20 Oct 2026 11:48:18 +1300 Subject: [PATCH] Fix supplied ref=CITEREF error when item has editors but no authors --- module_citeq.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/module_citeq.lua b/module_citeq.lua index 6bfb259..b731e1f 100644 --- a/module_citeq.lua +++ b/module_citeq.lua @@ -901,7 +901,13 @@ local function _cite_q (citeq_args) if names.authors_overridden or (#names.authors == 0 and names.editors_overridden) then -- if names are supplied manually, then don't mess with supplied ref parameter elseif citeq_args.ref and 'none' ~= citeq_args.ref then - local citeref = make_citeref(names.authors or names.editors, pubyear) + local refnames + if #names.authors > 0 then + refnames = names.authors + else + refnames = names.editors + end + local citeref = make_citeref(refnames, pubyear) if citeq_args.ref == citeref then citeq_args.ref = nil -- avoid CS1 maint: ref duplicates default else