diff --git a/src/wrapper.lua b/src/wrapper.lua index e1a2034..a5db0bc 100644 --- a/src/wrapper.lua +++ b/src/wrapper.lua @@ -8,16 +8,16 @@ end)(setmetatable({ __call = function(self, mod_name) local mod_cache, ret_cache = self[1], self[2] local mod, ret = mod_cache[mod_name], ret_cache[mod_name] - + if not mod then return require(mod_name) end - + if mod and not ret then ret_cache[mod_name] = mod(self) ret = ret_cache[mod_name] end - + return ret end, __metatable = false })) \ No newline at end of file