Changed env.json to ignore keys which arn't strings or numbers

This commit is contained in:
rxi 2014-04-14 00:10:34 +01:00
parent 3b2e834711
commit f7578fe07e

View File

@ -337,7 +337,11 @@ lovebird.pages["env.json"] = [[
"vars": [ "vars": [
<?lua <?lua
local keys = {} local keys = {}
for k in pairs(t) do table.insert(keys, k) end for k in pairs(t) do
if type(k) == "number" or type(k) == "string" then
table.insert(keys, k)
end
end
table.sort(keys) table.sort(keys)
for _, k in pairs(keys) do for _, k in pairs(keys) do
local v = t[k] local v = t[k]