From: Cheng Zhao Date: Thu, 27 Jun 2013 10:51:41 +0000 (+0800) Subject: typeof null can also be 'object'. X-Git-Tag: v0.1.0~77 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=5b80e14f3828b4158657077d5cc0c9eb56569f6c;p=electron.git typeof null can also be 'object'. --- diff --git a/renderer/api/lib/remote.coffee b/renderer/api/lib/remote.coffee index 449de140..3a7436e8 100644 --- a/renderer/api/lib/remote.coffee +++ b/renderer/api/lib/remote.coffee @@ -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)