mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
fix(client): fix error thrown when no block context (#6696)
This commit is contained in:
parent
b04e877d31
commit
e9560bb42c
@ -151,7 +151,7 @@ export const AssignedFieldInner = (props: AssignedFieldProps) => {
|
||||
|
||||
export const AssignedField = (props) => {
|
||||
const { form } = useFormBlockContext();
|
||||
const { name } = useBlockContext();
|
||||
const { name } = useBlockContext() || {};
|
||||
return (
|
||||
<BlockContext.Provider value={{ name: form ? 'form' : name }}>
|
||||
<AssignedFieldInner {...props} />
|
||||
|
Loading…
x
Reference in New Issue
Block a user