Skip to content

Commit 8bb6da9

Browse files
committed
chore: fix tests
1 parent 7b3b83d commit 8bb6da9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/vue-composable/src/validation/validation.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,12 +360,18 @@ const buildValidation = <T>(
360360
r[k].$touch = () => {
361361
// r[k].
362362
keys.forEach((m) => {
363-
r[k][m].$touch?.();
363+
const touch = r[k][m].$touch;
364+
if (touch) {
365+
touch();
366+
}
364367
});
365368
};
366369
r[k].$reset = () => {
367370
keys.forEach((m) => {
368-
r[k][m].$reset?.();
371+
const reset = r[k][m].$reset;
372+
if (reset) {
373+
reset();
374+
}
369375
});
370376
};
371377
}

0 commit comments

Comments
 (0)