Skip to content

Commit

Permalink
Fix error in Lua require() function
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenCWills committed Oct 13, 2024
1 parent 197827a commit 84c3b5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/lua/lua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ function requireGen(env, loaded, loadFn)
local p = loaded[packageName]
if p == nil then
local loader = loadFn(packageName)
setEnvironment(loader, env)
if type(loader) == "string" then
error(loader)
end
setEnvironment(env, loader)
p = loader(packageName)
loaded[packageName] = p
end
Expand Down

0 comments on commit 84c3b5f

Please sign in to comment.