diff --git a/cocos/scripting/lua-bindings/script/cocos2d/functions.lua b/cocos/scripting/lua-bindings/script/cocos2d/functions.lua index a67e08796a69..6ef403ec38ab 100644 --- a/cocos/scripting/lua-bindings/script/cocos2d/functions.lua +++ b/cocos/scripting/lua-bindings/script/cocos2d/functions.lua @@ -148,7 +148,7 @@ setmetatableindex_ = function(t, index) mt.__index = index setmetatable(t, mt) elseif mt.__index ~= index then - setmetatableindex_(mt, index) + setmetatableindex_(mt.__index, index) end end end