Skip to content

Commit

Permalink
🐛 Check JSCFunction first
Browse files Browse the repository at this point in the history
When performing type check, we first consider if the object is a JSCFunction
  • Loading branch information
TheEEs committed Apr 21, 2021
1 parent 0641e64 commit 33873ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/jsc_function.cr
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ struct JSCFunction
end
ret = JSC.invoke_function @value, args.size, first_arg
return case JSC
when .is_object(ret) then JSCObject.new ret
when .is_function(ret) then JSCFunction.new ret
when .is_object(ret) then JSCObject.new ret
else JSCPrimative.new ret
end
end
Expand Down

0 comments on commit 33873ce

Please sign in to comment.