From: Daniel Brooks Date: Thu, 24 Mar 2011 22:57:20 +0000 (-0500) Subject: apply function isn't really needed now that there's only once call site X-Git-Tag: v0.5~47 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=f81b4d1111559cf6496b755eaad8a3d631de5c1e;p=popcorn-js.git apply function isn't really needed now that there's only once call site --- diff --git a/popcorn.js b/popcorn.js index bddfdcd..1735945 100644 --- a/popcorn.js +++ b/popcorn.js @@ -832,12 +832,13 @@ return Popcorn.plugin( name, function( options ) { var self = this; - function instantiate( p, options ) { return (typeof p === "function") ? p.call( self, options ) : p; } - function apply( fn, args ) { return fn && fn.apply( self, args ); } + function instantiate( p, options ) { + return (typeof p === "function") ? p.call( self, options ) : p; + } function delegate( name ) { return function() { plugins.forEach( function( p ) { - apply( p[name], arguments ); + p[name] && p[name].apply( self, arguments ); }); }; }