diff --git a/lua/pl/class.lua b/lua/pl/class.lua index cd041c82..98b5c2ac 100644 --- a/lua/pl/class.lua +++ b/lua/pl/class.lua @@ -227,7 +227,9 @@ class = setmetatable({},{ return function(...) local c = _class(...) c._name = key - rawset(env,key,c) + if env then + rawset(env,key,c) + end return c end end