Fix [clear_variable] not working on a variable name that happens to be a number
This commit is contained in:
parent
e4b4b1c6ce
commit
d4adbdcf91
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ function wml_actions.clear_variable(cfg, variables)
|
|||
local names = cfg.name or
|
||||
wml.error "[clear_variable] missing required name= attribute."
|
||||
if variables == nil then variables = wml.variables end
|
||||
for _,w in ipairs(names:split()) do
|
||||
for _,w in ipairs(tostring(names):split()) do
|
||||
variables[w:trim()] = nil
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue