@@ -3,6 +3,7 @@
import { addProp } from 'compiler/helpers'
export default function html (el: ASTElement, dir: ASTDirective) {
- if (!dir.value) return
- addProp(el, 'innerHTML', `__toString__(${dir.value})`)
+ if (dir.value) {
+ addProp(el, 'innerHTML', `__toString__(${dir.value})`)
+ }
}
export default function text (el: ASTElement, dir: ASTDirective) {
- addProp(el, 'textContent', `__toString__(${dir.value})`)
+ addProp(el, 'textContent', `__toString__(${dir.value})`)