This commit is contained in:
Ryan Prichard 2015-11-24 16:49:52 -06:00
parent bf5e9e4f4d
commit 0f5a3baff4

View file

@ -107,7 +107,7 @@ unwrapArgs = (sender, args) ->
# style function and the caller didn't pass a callback.
callFunction = (event, func, caller, args) ->
funcMarkedAsync = v8Util.getHiddenValue(func, 'asynchronous')
funcPassedCallback = args[args.length - 1] is 'function'
funcPassedCallback = typeof args[args.length - 1] is 'function'
try
if funcMarkedAsync and not funcPassedCallback