Permalink
Browse files

Merge pull request #20 from deefour/plugins-init

Fixes getter methods created when plugins are initialized.
  • Loading branch information...
2 parents 537f38b + 0a805ee commit f7b74ddfd3b62632fda5ee32d50c6918949caf52 @alexgorbatchev alexgorbatchev committed Feb 19, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/js/textext.core.js
View
@@ -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));
}

0 comments on commit f7b74dd

Please sign in to comment.