Editing Module:GameDataGive feedback
Jump to navigation
Jump to search
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 245: | Line 245: | ||
end | end | ||
-- Traverse a table using dot notation, unwrap tables with a .Value field | -- Traverse a table using dot notation, unwrap tables with a .Value field | ||
local function resolve_prop(tbl, prop) | local function resolve_prop(tbl, prop) | ||
if not prop or prop == "" then return nil end | if not prop or prop == "" then return nil end | ||
| Line 252: | Line 251: | ||
for segment in string.gmatch(prop, "[^%.]+") do | for segment in string.gmatch(prop, "[^%.]+") do | ||
if type(element) ~= "table" then return nil end | if type(element) ~= "table" then return nil end | ||
element = element[segment] | |||
if element == nil then return nil end | if element == nil then return nil end | ||
end | end | ||