Fixed a minor bug involving nested objects.
This commit is contained in:
parent
ee9dad9578
commit
01c0ce3c72
|
@ -549,6 +549,15 @@ field[value;Value;${value}]
|
|||
return info
|
||||
end
|
||||
end
|
||||
|
||||
-- We want to avoid problems like this:
|
||||
-- serialize({nest = serialize({table})) =/= serialize({nest = {table}})
|
||||
-- so we automatically deserialize the value if it can be deserialized.
|
||||
if type(value) == "string" then
|
||||
local deserialized = minetest.deserialize(value)
|
||||
if deserialized then value = deserialized end
|
||||
end
|
||||
|
||||
info[propname] = value
|
||||
|
||||
return info
|
||||
|
|
Reference in New Issue