aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/modulemanager.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/modulemanager.lua b/core/modulemanager.lua
index 37c5e382..6b2260f5 100644
--- a/core/modulemanager.lua
+++ b/core/modulemanager.lua
@@ -398,7 +398,7 @@ function api:require(lib)
f, n = pluginloader.load_code(lib, lib..".lib.lua");
end
if not f then error("Failed to load plugin library '"..lib.."', error: "..n); end -- FIXME better error message
- setfenv(f, setmetatable({ module = self }, { __index = _G }));
+ setfenv(f, self.environment);
return f();
end