diff --git a/components/Spelling.vue b/components/Spelling.vue index 29f56b9ae..1ca144540 100644 --- a/components/Spelling.vue +++ b/components/Spelling.vue @@ -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 '' + } + } }