mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-17 17:48:36 +00:00
1 parent
ebddb35b00
commit
99fb752d30
2 files changed
+8
No files matched your search
@@ -74,6 +74,10 @@ lib.callback = setmetatable({}, {
|
||||
else
|
||||
local cbType = type(cb)
|
||||
|
||||
if cbType == 'table' and getmetatable(cb)?.__call then
|
||||
cbType = 'function'
|
||||
end
|
||||
|
||||
assert(cbType == 'function', ("expected argument 3 to have type 'function' (received %s)"):format(cbType))
|
||||
end
|
||||
|
||||
|
||||
@@ -57,6 +57,10 @@ lib.callback = setmetatable({}, {
|
||||
else
|
||||
local cbType = type(cb)
|
||||
|
||||
if cbType == 'table' and getmetatable(cb)?.__call then
|
||||
cbType = 'function'
|
||||
end
|
||||
|
||||
assert(cbType == 'function', ("expected argument 3 to have type 'function' (received %s)"):format(cbType))
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user