simplified wrequire

This commit is contained in:
mutlusun 2017-01-20 19:15:56 +01:00
parent d942d1848c
commit 631c6e87ff
1 changed files with 1 additions and 4 deletions

View File

@ -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