Skip to content

Commit

Permalink
faster code generation for m-for
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Apr 22, 2017
1 parent 98ac037 commit 353dc8c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2175,9 +2175,7 @@
var params = aliases.join(",");

// Change any references to the parameters in children
code.replace(new RegExp('instance\\.get\\("(' + aliases.join("|") + ')"\\)', 'g'), function (match, alias) {
code = code.replace(new RegExp('instance.get\\("' + alias + '"\\)', "g"), alias);
});
code.replace(new RegExp('instance\\.get\\("(' + aliases.join("|") + ')"\\)', 'g'), "$1");

// Use the renderLoop runtime helper
return 'instance.renderLoop(' + iteratable + ', function(' + params + ') { return ' + code + '; })';
Expand Down
Loading

0 comments on commit 353dc8c

Please sign in to comment.