fix(plugin-workflow): fix null collection fields (#1674)
This commit is contained in:
parent
93348c9ce6
commit
e9d5fa7f9c
@ -130,13 +130,14 @@ export function useWorkflowVariableOptions(types?) {
|
|||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
function useNormallizedFields(collection) {
|
function useNormallizedFields(collectionName) {
|
||||||
const compile = useCompile();
|
const compile = useCompile();
|
||||||
const { getCollection } = useCollectionManager();
|
const { getCollection } = useCollectionManager();
|
||||||
|
const collection = getCollection(collectionName);
|
||||||
if (!collection) {
|
if (!collection) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
const { fields } = getCollection(collection);
|
const { fields } = collection;
|
||||||
const foreignKeyFields: any[] = [];
|
const foreignKeyFields: any[] = [];
|
||||||
const otherFields: any[] = [];
|
const otherFields: any[] = [];
|
||||||
fields.forEach(field => {
|
fields.forEach(field => {
|
||||||
|
Loading…
Reference in New Issue
Block a user