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

@ -45,13 +45,11 @@ class CallbacksRegistry {
}
call (id, ...args) {
var ref
return (ref = this.get(id)).call.apply(ref, [global].concat(args))
return this.get(id).call(global, ...args)
}
apply (id, ...args) {
var ref
return (ref = this.get(id)).apply.apply(ref, [global].concat(args))
return this.get(id).apply(global, ...args)
}
remove (id) {