Use spread syntax instead of function apply
This commit is contained in:
parent
f72942bff1
commit
c8ff67ab75
12 changed files with 30 additions and 34 deletions
|
@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue