mirror of
https://github.com/Tonejs/Tone.js
synced 2024-11-16 08:38:00 +00:00
optimizing slice call
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functi ons/arguments
This commit is contained in:
parent
4f9143c76e
commit
84bbdb5c04
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ define(["Tone/core/Tone"], function (Tone) {
|
|||
*/
|
||||
Tone.Emitter.prototype.emit = function(event){
|
||||
if (this._events){
|
||||
var args = Array.prototype.slice.call(arguments, 1);
|
||||
var args = Array.apply(null, arguments).slice(1);
|
||||
if (this._events.hasOwnProperty(event)){
|
||||
var eventList = this._events[event];
|
||||
for (var i = 0, len = eventList.length; i < len; i++){
|
||||
|
|
Loading…
Reference in a new issue