fix(acl): cannot read properties of undefined (reading 'fields')
This commit is contained in:
		
							parent
							
								
									466aa4987e
								
							
						
					
					
						commit
						54e92918b2
					
				| @ -11,8 +11,8 @@ export const useCollection = () => { | ||||
|   const api = useAPIClient(); | ||||
|   const resource = api?.resource(collection?.name); | ||||
|   const { getInheritCollections, getCurrentCollectionFields } = useCollectionManager(); | ||||
|   const currentFields = collection.fields; | ||||
|   const inheritKeys = getInheritCollections(collection.name); | ||||
|   const currentFields = collection?.fields || []; | ||||
|   const inheritKeys = getInheritCollections(collection?.name) || []; | ||||
|   const inheritedFields = reduce( | ||||
|     inheritKeys, | ||||
|     (result, value) => { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user