mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 21:11:50 +00:00
fix
This commit is contained in:
parent
f944dfb51d
commit
032b5ae9dc
1 changed files with 4 additions and 1 deletions
|
|
@ -228,7 +228,10 @@ function gui.template(name, params)
|
||||||
local text = file.read(file.find("layouts/templates/"..name..".xml"))
|
local text = file.read(file.find("layouts/templates/"..name..".xml"))
|
||||||
text = text:gsub("%%{([^}]+)}", function(n)
|
text = text:gsub("%%{([^}]+)}", function(n)
|
||||||
local s = params[n]
|
local s = params[n]
|
||||||
if not s or #s == 0 then
|
if type(s) ~= "string" then
|
||||||
|
return s
|
||||||
|
end
|
||||||
|
if #s == 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local e = string.escape(s)
|
local e = string.escape(s)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue