Skip to content

Commit

Permalink
fix: deoptimize dynamic DOM props
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Oct 21, 2017
1 parent f2b68c7 commit 40d2774
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
10 changes: 6 additions & 4 deletions dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -1012,10 +1012,12 @@
// During generation
var duringProp = during(attr, node, parentNode, state);
var duringPropOutput = duringProp.output;

if(duringProp.dynamic === true) {
dynamic = true;
}

if(duringPropOutput !== undefined) {
if(duringProp.dynamic === true) {
dynamic = true;
}
generateAttrs.push(duringPropOutput);
}
}
Expand Down Expand Up @@ -1171,7 +1173,7 @@
for(i = 0; i < generatedChildren.length; i++) {
var generatedChild$1 = generatedChildren[i];
if(dynamic === true && generatedChild$1.dynamic === false) {
childrenOutput += "" + separator + (generateStaticNode(generatedChild$1.output, staticNodes));
childrenOutput += separator + generateStaticNode(generatedChild$1.output, staticNodes);
} else {
childrenOutput += separator + generatedChild$1.output;
}
Expand Down
Loading

0 comments on commit 40d2774

Please sign in to comment.