mirror of
https://github.com/vrld/hump.git
synced 2024-11-23 12:24:19 +00:00
Bug in non-table syntax: "attempt to index local 'args'"
This commit is contained in:
parent
28b698fb00
commit
6089ad4494
@ -67,7 +67,7 @@ local function new(args)
|
|||||||
class.is_a = function(self, other) return not not self.__is_a[other] end
|
class.is_a = function(self, other) return not not self.__is_a[other] end
|
||||||
|
|
||||||
-- intercept assignment in global environment to infer the class name
|
-- intercept assignment in global environment to infer the class name
|
||||||
if not (args and args.name) then
|
if not (type(args) == "table" and args.name) then
|
||||||
local env, env_meta, interceptor = getfenv(0), getmetatable(getfenv(0)), {}
|
local env, env_meta, interceptor = getfenv(0), getmetatable(getfenv(0)), {}
|
||||||
function interceptor:__newindex(key, value)
|
function interceptor:__newindex(key, value)
|
||||||
if value == class then
|
if value == class then
|
||||||
|
Loading…
Reference in New Issue
Block a user