mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-17 13:33:07 -04:00
The search tree adapter was typed `Ref<HoppCollection[]>` but the teams provider forces a `Ref<TeamCollection[]>` into it via a double-cast (`as unknown as Ref<HoppCollection[]>` in teams.workspace.ts:1472). `HoppCollection` uses `folders` while `TeamCollection` uses `children`. Root-level rendering worked because both types expose a top-level `requests`, but expanding a nested team search hit would throw `TypeError: Cannot read properties of undefined (reading 'map')` on `item.folders.map`. Normalize access inside the adapter via a union-safe shape that reads either `folders` or `children`, and replace the personal-only `navigateToFolderWithIndexPath` walk with a local walker using the same accessor. Personal-workspace behavior is unchanged; team-workspace expansion now walks the nested tree correctly.