Use spread syntax instead of function apply

This commit is contained in:
Kevin Sawicki 2016-12-01 14:37:03 -08:00
parent f72942bff1
commit c8ff67ab75
12 changed files with 30 additions and 34 deletions

View file

@ -81,7 +81,7 @@ app.allowNTLMCredentialsForAllDomains = function (allow) {
const events = ['login', 'certificate-error', 'select-client-certificate']
for (let name of events) {
app.on(name, (event, webContents, ...args) => {
webContents.emit.apply(webContents, [name, event].concat(args))
webContents.emit(name, event, ...args)
})
}