simplified wrequire
This commit is contained in:
parent
d942d1848c
commit
631c6e87ff
|
@ -65,10 +65,7 @@ function helpers.wrequire(table, key)
|
||||||
assert(os, "Vicious: platform not supported.")
|
assert(os, "Vicious: platform not supported.")
|
||||||
|
|
||||||
for i = 1, #os do
|
for i = 1, #os do
|
||||||
local status, value =
|
local status, value = pcall(require, table._NAME .. "." .. key .. "_" .. os[i])
|
||||||
pcall(function()
|
|
||||||
return require(table._NAME .. "." .. key .. "_" .. os[i])
|
|
||||||
end)
|
|
||||||
if status then
|
if status then
|
||||||
ret = value
|
ret = value
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue