spelling - fix handling empty tags

This commit is contained in:
Andrea Vos 2021-02-02 21:19:17 +00:00
parent 1efe971d45
commit 9f8f771915

View File

@ -7,7 +7,18 @@
text: {},
},
render(h) {
return h('span', {domProps: { innerHTML: this.handleSpelling(this.text !== undefined ? this.text : this.$slots.default[0].text) }});
return h('span', {domProps: { innerHTML: this.handleSpelling(this.val) }});
},
computed: {
val() {
if (this.text !== undefined) {
return this.text;
}
if (this.$slots.default && this.$slots.default.length) {
return this.$slots.default[0].text;
}
return ''
}
}
}
</script>