typeof null can also be 'object'.

This commit is contained in:
Cheng Zhao 2013-06-27 18:51:41 +08:00
parent 0c6997b160
commit 5b80e14f38

View file

@ -8,7 +8,7 @@ callbacksRegistry = new CallbacksRegistry
# Convert the arguments object into an array of meta data.
wrapArgs = (args) ->
Array::slice.call(args).map (value) ->
if typeof value is 'object' and v8Util.getHiddenValue value, 'isRemoteObject'
if value? and typeof value is 'object' and v8Util.getHiddenValue value, 'isRemoteObject'
type: 'object', id: value.id
else if typeof value is 'function'
type: 'function', id: callbacksRegistry.add(value)