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

@ -246,7 +246,7 @@ WebContents.prototype._init = function () {
// Delays the page-title-updated event to next tick.
this.on('-page-title-updated', function (...args) {
setImmediate(() => {
this.emit.apply(this, ['page-title-updated'].concat(args))
this.emit('page-title-updated', ...args)
})
})