diff --git a/resources/ts/components/bo/WordCounterComponent.vue b/resources/ts/components/bo/WordCounterComponent.vue index 3ccfc09..0fed0b0 100644 --- a/resources/ts/components/bo/WordCounterComponent.vue +++ b/resources/ts/components/bo/WordCounterComponent.vue @@ -46,9 +46,10 @@ export default defineComponent({ throw new Error("Missing ID"); } const input = document.getElementById(this.id); - if (!input) { + if (!input || !(input instanceof HTMLInputElement)) { throw new Error(`Input ${this.id} could not be found`); } + this.input = input; }, input() { if (!this.input) {