fix: filterable undefined (#2646)
This commit is contained in:
parent
0c132d7940
commit
feaf4cd80a
@ -14,7 +14,7 @@ export const useFilterableFields = (collectionName: string) => {
|
||||
return false;
|
||||
}
|
||||
const fieldInterface = getInterface(field.interface);
|
||||
if (!fieldInterface.filterable) {
|
||||
if (!fieldInterface?.filterable) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -36,7 +36,7 @@ export const useGetFilterFieldOptions = () => {
|
||||
return;
|
||||
}
|
||||
const fieldInterface = getInterface(field.interface);
|
||||
if (!fieldInterface.filterable) {
|
||||
if (!fieldInterface?.filterable) {
|
||||
return;
|
||||
}
|
||||
const { nested, children, operators } = fieldInterface.filterable;
|
||||
@ -93,7 +93,7 @@ export const useFilterFieldOptions = (fields) => {
|
||||
return;
|
||||
}
|
||||
const fieldInterface = getInterface(field.interface);
|
||||
if (!fieldInterface.filterable) {
|
||||
if (!fieldInterface?.filterable) {
|
||||
return;
|
||||
}
|
||||
const { nested, children, operators } = fieldInterface.filterable;
|
||||
|
@ -39,7 +39,7 @@ const useVariableTypes = (currentCollection, excludes = []) => {
|
||||
return;
|
||||
}
|
||||
const fieldInterface = getInterface(field.interface);
|
||||
if (!fieldInterface.filterable) {
|
||||
if (!fieldInterface?.filterable) {
|
||||
return;
|
||||
}
|
||||
const { nested, children } = fieldInterface.filterable;
|
||||
|
Loading…
Reference in New Issue
Block a user