From 1f084d024dc2476eef227cb83460672091780792 Mon Sep 17 00:00:00 2001 From: jaubourg Date: Tue, 24 May 2011 17:27:05 +0200 Subject: [PATCH] Shortens slice expression in channel helpers as per rwaldron's suggestion. --- src/channel.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/channel.js b/src/channel.js index 013b65f1..66b2745a 100644 --- a/src/channel.js +++ b/src/channel.js @@ -5,7 +5,8 @@ publish: "fire", subscribe: "add", unsubscribe: "remove" - }; + }, + sliceChannel = [].slice; jQuery.Channel = function( name ) { var callbacks, @@ -27,7 +28,7 @@ jQuery.each( channelMethods, function( method ) { jQuery[ method ] = function( name ) { var channel = jQuery.Channel( name ); - channel[ method ].apply( channel, Array.prototype.slice.call( arguments, 1 ) ); + channel[ method ].apply( channel, sliceChannel.call( arguments, 1 ) ); }; });