Skip to content

Commit 1f084d0

Browse files
committed
Shortens slice expression in channel helpers as per rwaldron's suggestion.
1 parent 57634a2 commit 1f084d0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/channel.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
publish: "fire",
66
subscribe: "add",
77
unsubscribe: "remove"
8-
};
8+
},
9+
sliceChannel = [].slice;
910

1011
jQuery.Channel = function( name ) {
1112
var callbacks,
@@ -27,7 +28,7 @@
2728
jQuery.each( channelMethods, function( method ) {
2829
jQuery[ method ] = function( name ) {
2930
var channel = jQuery.Channel( name );
30-
channel[ method ].apply( channel, Array.prototype.slice.call( arguments, 1 ) );
31+
channel[ method ].apply( channel, sliceChannel.call( arguments, 1 ) );
3132
};
3233
});
3334

0 commit comments

Comments
 (0)