]> khamidou — GitHub mirrors - electron.git/commitdiff
typeof null can also be 'object'.
authorCheng Zhao <zcbenz@gmail.com>
Thu, 27 Jun 2013 10:51:41 +0000 (18:51 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Thu, 27 Jun 2013 11:33:53 +0000 (19:33 +0800)
renderer/api/lib/remote.coffee

index 449de140e72d140b9cbb81296eac813c80cc2ff2..3a7436e86e3476d19fcf14cce6a8aaf177e3f329 100644 (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)