Modul:Attribut: Unterschied zwischen den Versionen

fix attrText() nil-handling
(fix attrText() nil-handling)
(fix attrText() nil-handling)
Zeile 52: Zeile 52:
function p.attrText(attr, klasse, mehrzahl)
function p.attrText(attr, klasse, mehrzahl)
local query, text = p.getAttrAttributes(attr, klasse)
local query, text = p.getAttrAttributes(attr, klasse)
if mehrzahl then
if query == nil then
text = query["Mehrzahl"] or attr
text = attr
elseif mehrzahl then
text = query["Mehrzahl"]
else
else
text = query["Einzahl"] or attr
text = query["Einzahl"]
end
end
return text
return text