Fix https://github.com/atom/electron/issues/3565 by adding a typeof
This commit is contained in:
parent
bf5e9e4f4d
commit
0f5a3baff4
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ unwrapArgs = (sender, args) ->
|
||||||
# style function and the caller didn't pass a callback.
|
# style function and the caller didn't pass a callback.
|
||||||
callFunction = (event, func, caller, args) ->
|
callFunction = (event, func, caller, args) ->
|
||||||
funcMarkedAsync = v8Util.getHiddenValue(func, 'asynchronous')
|
funcMarkedAsync = v8Util.getHiddenValue(func, 'asynchronous')
|
||||||
funcPassedCallback = args[args.length - 1] is 'function'
|
funcPassedCallback = typeof args[args.length - 1] is 'function'
|
||||||
|
|
||||||
try
|
try
|
||||||
if funcMarkedAsync and not funcPassedCallback
|
if funcMarkedAsync and not funcPassedCallback
|
||||||
|
|
Loading…
Reference in a new issue