Skip to content

Commit

Permalink
Fixed two cases where []. was used instead of Array.prototype. (Bug #…
Browse files Browse the repository at this point in the history
  • Loading branch information
jeresig committed Aug 20, 2007
1 parent 05fb8ea commit bd78d4f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/event/event.js
Expand Up @@ -161,7 +161,7 @@ jQuery.event = {
// Empty object is for triggered events with no data
event = jQuery.event.fix( event || window.event || {} );

var c = this.$events && this.$events[event.type], args = [].slice.call( arguments, 1 );
var c = this.$events && this.$events[event.type], args = Array.prototype.slice.call( arguments, 1 );
args.unshift( event );

for ( var j in c ) {
Expand Down
2 changes: 1 addition & 1 deletion src/jquery/jquery.js
Expand Up @@ -301,7 +301,7 @@ jQuery.fn = jQuery.prototype = {
*/
setArray: function( a ) {
this.length = 0;
[].push.apply( this, a );
Array.prototype.push.apply( this, a );
return this;
},

Expand Down

0 comments on commit bd78d4f

Please sign in to comment.