Skip to content

Commit

Permalink
m-if now generates an empty text node
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Apr 15, 2017
1 parent 5e21233 commit 454e04f
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 @@ -2094,7 +2094,7 @@

specialDirectives[Moon.config.prefix + "if"] = {
afterGenerate: function (value, meta, code, vnode) {
return '(' + compileTemplate(value, delimiters, escapedDelimiters, false) + ') ? ' + code + ' : null';
return '(' + compileTemplate(value, delimiters, escapedDelimiters, false) + ') ? ' + code + ' : h("#text", ' + generateMeta(defaultMetadata()) + ', "")';
}
};

Expand Down
Loading

0 comments on commit 454e04f

Please sign in to comment.