Fixed two cases where []. was used instead of Array.prototype. (Bug #1427)
This commit is contained in:
parent
05fb8eaa10
commit
bd78d4f65d
|
@ -161,7 +161,7 @@ jQuery.event = {
|
||||||
// Empty object is for triggered events with no data
|
// Empty object is for triggered events with no data
|
||||||
event = jQuery.event.fix( event || window.event || {} );
|
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 );
|
args.unshift( event );
|
||||||
|
|
||||||
for ( var j in c ) {
|
for ( var j in c ) {
|
||||||
|
|
2
src/jquery/jquery.js
vendored
2
src/jquery/jquery.js
vendored
|
@ -301,7 +301,7 @@ jQuery.fn = jQuery.prototype = {
|
||||||
*/
|
*/
|
||||||
setArray: function( a ) {
|
setArray: function( a ) {
|
||||||
this.length = 0;
|
this.length = 0;
|
||||||
[].push.apply( this, a );
|
Array.prototype.push.apply( this, a );
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue