Skip to content

Commit 3eadc05

Browse files
dadiminggo
dadi
authored and
minggo
committed
Fix iskindof (cocos2d#17785)
* Fix iskindof logic error * fix iskindof * No need to deal metatables in function iskindof_
1 parent dd880ee commit 3eadc05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cocos/scripting/lua-bindings/script/cocos2d/functions.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ function iskindof(obj, classname)
267267
local mt
268268
if t == "userdata" then
269269
if tolua.iskindof(obj, classname) then return true end
270-
mt = tolua.getpeer(obj)
270+
mt = getmetatable(tolua.getpeer(obj))
271271
else
272272
mt = getmetatable(obj)
273273
end

0 commit comments

Comments
 (0)