Skip to content

Commit 673ecf5

Browse files
committed
fix type error
1 parent d44d1d3 commit 673ecf5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/ui/src/forms/useField/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export const useField = <TValue,>(options?: Options): FieldType<TValue> => {
248248
// Use field context, if a field context exists **and** the path matches. If the path
249249
// does not match, this could be the field context of a parent field => there likely is
250250
// a nested <Form /> we should use instead => 'impl'
251-
const currentPath = options.path || pathFromContext || options.potentiallyStalePath
251+
const currentPath = options?.path || pathFromContext || options.potentiallyStalePath
252252

253253
modeRef.current = ctx && currentPath && ctx.path === currentPath ? 'context' : 'impl'
254254
}

0 commit comments

Comments
 (0)