Skip to content

Commit

Permalink
Schema-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
henit committed Nov 13, 2023
1 parent 5f17902 commit 77c63d9
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,6 @@ export default function useDataValue<
)
throw error
}

// Validate by provided derivative validator
if (validatorRef.current) {
const res = await validatorRef.current?.(valueRef.current)
Expand All @@ -284,7 +283,7 @@ export default function useDataValue<
])

useUpdateEffect(() => {
if (typeof schema !== 'object') {
if (!schema) {
return
}
schemaValidatorRef.current = ajv.compile(schema)
Expand Down

0 comments on commit 77c63d9

Please sign in to comment.