]> source.dussan.org Git - jquery.git/commitdiff
Fixed two cases where []. was used instead of Array.prototype. (Bug #1427)
authorJohn Resig <jeresig@gmail.com>
Mon, 20 Aug 2007 07:08:01 +0000 (07:08 +0000)
committerJohn Resig <jeresig@gmail.com>
Mon, 20 Aug 2007 07:08:01 +0000 (07:08 +0000)
src/event/event.js
src/jquery/jquery.js

index 59fff51da8f25313c42839afb746a1cf0260cc48..cbad528f3e9f3a4e8a67c4fc006b9cf899fa70c9 100644 (file)
@@ -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 ) {
index 76b08edf054094f5dd5620439b955b8b4ceb9f5d..797280e073759b663dbc38da8c92405199063f5e 100644 (file)
@@ -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;
        },