diff --git a/packages/hoppscotch-common/src/helpers/adapters/WorkspaceRESTCollectionSearchTreeAdapter.ts b/packages/hoppscotch-common/src/helpers/adapters/WorkspaceRESTCollectionSearchTreeAdapter.ts index 1716f23c2..b85ef76be 100644 --- a/packages/hoppscotch-common/src/helpers/adapters/WorkspaceRESTCollectionSearchTreeAdapter.ts +++ b/packages/hoppscotch-common/src/helpers/adapters/WorkspaceRESTCollectionSearchTreeAdapter.ts @@ -10,8 +10,7 @@ export class WorkspaceRESTSearchCollectionTreeAdapter constructor(public data: Ref) {} getChildren( - nodeID: string | null, - nodeType?: string + nodeID: string | null ): Ref> { const result = ref>({ status: "loading", @@ -35,7 +34,7 @@ export class WorkspaceRESTSearchCollectionTreeAdapter }, })), } - } else if (nodeType === "collection") { + } else { const indexPath = nodeID.split("/").map((x) => parseInt(x)) const item = navigateToFolderWithIndexPath(this.data.value, indexPath) @@ -62,7 +61,6 @@ export class WorkspaceRESTSearchCollectionTreeAdapter ) const requests = item.requests.map((request, requestID) => { - // TODO: Replace `parentCollectionID` with `collectionID` return { id: `${nodeID}/${requestID}`, data: { diff --git a/packages/hoppscotch-common/src/helpers/adapters/WorkspaceRESTCollectionTreeAdapter.ts b/packages/hoppscotch-common/src/helpers/adapters/WorkspaceRESTCollectionTreeAdapter.ts index 8606a832f..d8159c713 100644 --- a/packages/hoppscotch-common/src/helpers/adapters/WorkspaceRESTCollectionTreeAdapter.ts +++ b/packages/hoppscotch-common/src/helpers/adapters/WorkspaceRESTCollectionTreeAdapter.ts @@ -32,6 +32,10 @@ export class WorkspaceRESTCollectionTreeAdapter if (nodeID !== null) { ;(async () => { if (nodeType === "request") { + result.value = { + status: "loaded", + data: [], + } return }