(collections: Collection[], collectionId: number)
| 4 | import { findCollection } from '../state/collections'; |
| 5 | |
| 6 | function getParentTree(collections: Collection[], collectionId: number): Collection[] { |
| 7 | const c = findCollection(collections, collectionId); |
| 8 | if (!c) return []; |
| 9 | |
| 10 | if (!c.data?.parentId) return [c]; |
| 11 | |
| 12 | return [c, ...getParentTree(collections, c.data?.parentId)]; |
| 13 | } |
| 14 | |
| 15 | function getMergedEnvData( |
| 16 | collections: Collection[], |
no test coverage detected