Fix template not rendering with no opts.type

This commit is contained in:
Daniel Mathiot
2021-08-25 14:29:26 +02:00
parent a8954178da
commit b57e833e32

View File

@@ -86,9 +86,10 @@ neogen.default_generator = function(parent, data, template, required_type)
for _, values in ipairs(generated_template) do for _, values in ipairs(generated_template) do
local type = values[1] local type = values[1]
local formatted_string = values[2] local formatted_string = values[2]
local opts = values[3] or { local opts = values[3] or {}
type = { required_type } if not opts.type then
} opts.type = { required_type }
end
-- Will append the item before all their nodes -- Will append the item before all their nodes
if opts.before_first_item and data[type] then if opts.before_first_item and data[type] then