Bug Tracker

Changeset 2791

Show
Ignore:
Timestamp:
08/20/07 07:08:01 (1 year ago)
Author:
jeresig
Message:

Fixed two cases where []. was used instead of Array.prototype. (Bug #1427)

Location:
trunk/jquery/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/jquery/src/event/event.js

    r2785 r2791  
    162162        event = jQuery.event.fix( event || window.event || {} );  
    163163 
    164         var c = this.$events && this.$events[event.type], args = [].slice.call( arguments, 1 ); 
     164        var c = this.$events && this.$events[event.type], args = Array.prototype.slice.call( arguments, 1 ); 
    165165        args.unshift( event ); 
    166166 
  • trunk/jquery/src/jquery/jquery.js

    r2790 r2791  
    302302    setArray: function( a ) { 
    303303        this.length = 0; 
    304         [].push.apply( this, a ); 
     304        Array.prototype.push.apply( this, a ); 
    305305        return this; 
    306306    },