Merge pull request #7587 from electron/update-standard

Update standard to v8 to be inline with standard-markdown
This commit is contained in:
Kevin Sawicki 2016-10-13 14:04:24 -07:00 committed by GitHub
commit 0756aa663b
4 changed files with 5 additions and 5 deletions

View file

@ -279,7 +279,7 @@ ipcMain.on('ELECTRON_BROWSER_CONSTRUCTOR', function (event, id, args) {
// Call new with array of arguments.
// http://stackoverflow.com/questions/1606797/use-of-apply-with-new-operator-is-this-possible
let obj = new (Function.prototype.bind.apply(constructor, [null].concat(args)))
let obj = new (Function.prototype.bind.apply(constructor, [null].concat(args)))()
event.returnValue = valueToMeta(event.sender, obj)
} catch (error) {
event.returnValue = exceptionToMeta(error)
@ -302,7 +302,7 @@ ipcMain.on('ELECTRON_BROWSER_MEMBER_CONSTRUCTOR', function (event, id, method, a
let constructor = objectsRegistry.get(id)[method]
// Call new with array of arguments.
let obj = new (Function.prototype.bind.apply(constructor, [null].concat(args)))
let obj = new (Function.prototype.bind.apply(constructor, [null].concat(args)))()
event.returnValue = valueToMeta(event.sender, obj)
} catch (error) {
event.returnValue = exceptionToMeta(error)

View file

@ -7,7 +7,7 @@
"electabul": "~0.0.4",
"electron-docs-linter": "^1.8.2",
"request": "*",
"standard": "^7.1.2",
"standard": "^8.4.0",
"standard-markdown": "^2.1.1"
},
"optionalDependencies": {

View file

@ -45,7 +45,7 @@ describe('ipc module', function () {
assert.equal(a.bar, 1234)
assert.equal(a.anonymous.constructor.name, '')
assert.equal(a.getConstructorName(Object.create(null)), '')
assert.equal(a.getConstructorName(new (class {})), '')
assert.equal(a.getConstructorName(new (class {})()), '')
})
it('should search module from the user app', function () {

View file

@ -4,7 +4,7 @@ foo.baz = false
module.exports = {
foo: foo,
bar: 1234,
anonymous: new (class {}),
anonymous: new (class {})(),
getConstructorName: function (value) {
return value.constructor.name
}