Skip to content

Commit

Permalink
use initial render (ie m-once) to optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Feb 24, 2017
1 parent c7f297e commit 0bb74c5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@
var children = vnode.children.map(generateEl);
// Detected static vnode, tell diffing engine to skip it
if (vnode.children.length === 1 && children.length === 1 && typeof vnode.children[0] === "string" && "\"" + vnode.children[0] + "\"" === children[0] && !vnode.dynamic) {
vnode.meta.shouldRender = false;
vnode.meta.shouldRender = "instance.$initialRender";
}

call += generateMeta(vnode.meta);
Expand Down
Loading

0 comments on commit 0bb74c5

Please sign in to comment.