catch bad selectors
This commit is contained in:
@@ -37,15 +37,19 @@ watch(
|
|||||||
* Handle the user submitting the form.
|
* Handle the user submitting the form.
|
||||||
*/
|
*/
|
||||||
const submit = async function () {
|
const submit = async function () {
|
||||||
inputs = Array.from(document.querySelectorAll(`#${id} input`));
|
try {
|
||||||
|
inputs = Array.from(document.querySelectorAll(`#${id} input`));
|
||||||
|
|
||||||
for (let i = inputs.length - 1; i >= 0; i--) {
|
for (let i = inputs.length - 1; i >= 0; i--) {
|
||||||
const input = inputs[i] as HTMLInputElement;
|
const input = inputs[i] as HTMLInputElement;
|
||||||
if (!input.disabled) {
|
if (!input.disabled) {
|
||||||
input.disabled = true;
|
input.disabled = true;
|
||||||
} else {
|
} else {
|
||||||
inputs.splice(i, 1);
|
inputs.splice(i, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch {
|
||||||
|
/* empty */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await props.modelValue.validate()) {
|
if (await props.modelValue.validate()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user