failsafe for empty orgs.array
This commit is contained in:
parent
68d8da7290
commit
e22b143a6a
@ -71,9 +71,17 @@ dofile (topdir .. "/api.lua")
|
||||
|
||||
-- ===================================================================
|
||||
-- Final checks
|
||||
for id, org in ipairs(modpol.orgs.array) do
|
||||
if type(org) == 'table' then
|
||||
setmetatable(org, modpol.orgs)
|
||||
|
||||
-- sets org metatable on load
|
||||
if (modpol.orgs.array) then
|
||||
for id, org in ipairs(modpol.orgs.array) do
|
||||
if type(org) == 'table' then
|
||||
setmetatable(org, modpol.orgs)
|
||||
end
|
||||
-- sets process metatable on load
|
||||
for id, process in ipairs(org.processes) do
|
||||
setmetatable(process, org.modules[process.type])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user