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
				
			
		|  | @ -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) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Kevin Sawicki
				Kevin Sawicki