mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 07:06:06 +00:00
fix: avoid crash when field is deleted in Collapse
This commit is contained in:
parent
62381e5953
commit
4e84b14bc7
@ -980,7 +980,7 @@ export const useAssociationFilterBlockProps = () => {
|
||||
const fieldSchema = useFieldSchema();
|
||||
const optionalFieldList = useOptionalFieldList();
|
||||
const { getDataBlocks } = useFilterBlock();
|
||||
const collectionFieldName = collectionField.name;
|
||||
const collectionFieldName = collectionField?.name;
|
||||
const field = useField();
|
||||
|
||||
let list, handleSearchInput, params, run, data, valueKey, labelKey, filterKey;
|
||||
|
@ -29,7 +29,7 @@ export const useCollection = () => {
|
||||
return {
|
||||
...collection,
|
||||
resource,
|
||||
getField(name: SchemaKey): CollectionFieldOptions | null {
|
||||
getField(name: SchemaKey): CollectionFieldOptions | undefined {
|
||||
const fields = totalFields as any[];
|
||||
return fields?.find((field) => field.name === name);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user