Fix word counter
This commit is contained in:
parent
c9bc8d37ec
commit
bf9526fe19
1 changed files with 2 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue