fix: collections undefined inuseCollectionState (#3741)
This commit is contained in:
parent
93091a92f7
commit
7e32842a6d
@ -193,7 +193,7 @@ export class InheritanceCollectionMixin extends Collection {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.allCollectionsInheritChain = getInheritChain(this.name);
|
this.allCollectionsInheritChain = getInheritChain(this.name);
|
||||||
return this.allCollectionsInheritChain;
|
return this.allCollectionsInheritChain || [];
|
||||||
}
|
}
|
||||||
|
|
||||||
getInheritCollectionsChain() {
|
getInheritCollectionsChain() {
|
||||||
|
@ -26,7 +26,7 @@ export const useCollectionState = (currentCollectionName: string) => {
|
|||||||
const templateField: any = useField();
|
const templateField: any = useField();
|
||||||
|
|
||||||
function getCollectionList() {
|
function getCollectionList() {
|
||||||
const collections = getAllCollectionsInheritChain(currentCollectionName);
|
const collections = getAllCollectionsInheritChain(currentCollectionName) || [];
|
||||||
return collections.map((name) => ({ label: getCollection(name)?.title, value: name }));
|
return collections.map((name) => ({ label: getCollection(name)?.title, value: name }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user