Merge pull request #3573 from rprichard/fix_3565
Fix https://github.com/atom/electron/issues/3565 by adding a typeof
This commit is contained in:
commit
ec88567683
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.
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue