spelling - fix handling empty tags

This commit is contained in:
Avris 2021-02-02 21:56:17 +01:00
parent 789427bdab
commit 73fab096b9
1 changed files with 12 additions and 1 deletions

View File

@ -7,7 +7,18 @@
text: {}, text: {},
}, },
render(h) { 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> </script>