Skip to content

Commit d34095f

Browse files
committed
fix injection in field
1 parent 4d80985 commit d34095f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/components/ValidationField.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ const props = withDefaults(
2626
}
2727
)
2828
29-
const formConfig = inject<ComputedRef<FormConfig>>('formConfig')
30-
const formErrors = inject<Errors>('formErrors')
29+
const formConfig = inject<ComputedRef<FormConfig> | null >('formConfig', null)
30+
const formErrors = inject<Errors | null>('formErrors', null)
3131
3232
const errors = computed(() => {
3333
return (formErrors?.[props.name] ?? []).map((error) => getMessage(error, locale.value))

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kolirt/vue-validation-kit",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"type": "module",
55
"description": "A lightweight, Laravel-inspired validation package for Vue 3",
66
"author": "kolirt",

0 commit comments

Comments
 (0)