Skip to content

Commit

Permalink
Merge pull request #20 from deefour/plugins-init
Browse files Browse the repository at this point in the history
Fixes getter methods created when plugins are initialized.
  • Loading branch information
alexgorbatchev committed Feb 19, 2012
2 parents 537f38b + 0a805ee commit f7b74dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/textext.core.js
Expand Up @@ -802,7 +802,9 @@
if(plugin)
{
self._plugins[name] = plugin = new plugin();
self[name] = function() { return plugin; };
self[name] = (function(plugin) {
return function(){ return plugin; }
})(plugin);
initList.push(plugin);
$.extend(true, plugin, self.opts(OPT_EXT + '.*'), self.opts(OPT_EXT + '.' + name));
}
Expand Down

0 comments on commit f7b74dd

Please sign in to comment.