diff --git a/lib/renderer/api/remote.js b/lib/renderer/api/remote.js index b120bed0fe0..79fe41ed566 100644 --- a/lib/renderer/api/remote.js +++ b/lib/renderer/api/remote.js @@ -60,7 +60,7 @@ var wrapArgs = function (args, visited) { ret = { type: 'object', - name: value.constructor != null ? value.constructor.name : 'Object', + name: value.constructor != null ? value.constructor.name : '', members: [] } for (prop in value) { diff --git a/spec/api-ipc-spec.js b/spec/api-ipc-spec.js index 6b0222d62ee..2d439af0399 100644 --- a/spec/api-ipc-spec.js +++ b/spec/api-ipc-spec.js @@ -31,10 +31,11 @@ describe('ipc module', function () { it('should work when object has no prototype', function () { var a = remote.require(path.join(fixtures, 'module', 'no-prototype.js')) + assert.equal(a.foo.constructor.name, '') assert.equal(a.foo.bar, 'baz') assert.equal(a.foo.baz, false) assert.equal(a.bar, 1234) - assert.equal(a.getConstructorName(Object.create(null)), 'Object') + assert.equal(a.getConstructorName(Object.create(null)), '') assert.equal(a.getConstructorName(new (class {})), '') })