From: Anna Sobiepanek Date: Wed, 20 Apr 2011 14:55:34 +0000 (-0400) Subject: fixed as per PR comments [#474] X-Git-Tag: v0.5~14^2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=78f1535427f6b6bfb24e7e9ce11f5bf42e7f8acf;p=popcorn-js.git fixed as per PR comments [#474] --- diff --git a/popcorn.js b/popcorn.js index ae595d1..24dbd0a 100644 --- a/popcorn.js +++ b/popcorn.js @@ -845,13 +845,6 @@ // Extend Popcorn.p with new named definition Popcorn.extend( Popcorn.p, plugin ); - // Push into the registry - Popcorn.registry.push( - Popcorn.extend( plugin, { - type: name - }) - ); - // Push into the registry var entry = { fn: plugin[ name ], @@ -860,6 +853,11 @@ parents: [], name: name }; + Popcorn.registry.push( + Popcorn.extend( plugin, entry, { + type: name + }) + ); Popcorn.registryByName[ name ] = entry; return plugin;