From fbe0b8fd1004ab03f43cd9b110557d03e8e66f68 Mon Sep 17 00:00:00 2001 From: Leonic <88329746+Leon-Luu@users.noreply.github.com> Date: Thu, 29 Jan 2026 18:39:34 +0100 Subject: [PATCH] fix(common): handle null request `ref` in `InspectionService` for test-runner tabs (#5814) Co-authored-by: James George <25279263+jamesgeorge007@users.noreply.github.com> --- .../src/services/inspection/index.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/hoppscotch-common/src/services/inspection/index.ts b/packages/hoppscotch-common/src/services/inspection/index.ts index 109dfd87..c0493087 100644 --- a/packages/hoppscotch-common/src/services/inspection/index.ts +++ b/packages/hoppscotch-common/src/services/inspection/index.ts @@ -181,11 +181,18 @@ export class InspectionService extends Service { maxWait: 2000, }) - const inspectorRefs = computed(() => - Array.from(this.inspectors.values()).map((x) => - x.getInspections(debouncedReq, debouncedRes) + const inspectorRefs = computed(() => { + if (debouncedReq.value === null) return [] + + return Array.from(this.inspectors.values()).map((inspector) => + inspector.getInspections( + debouncedReq as Readonly< + Ref + >, + debouncedRes + ) ) - ) + }) const activeInspections = computed(() => inspectorRefs.value.flatMap((x) => x?.value ?? [])