fix(common): handle null request ref in InspectionService for test-runner tabs (#5814)
Co-authored-by: James George <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
parent
645ecb55d8
commit
fbe0b8fd10
1 changed files with 11 additions and 4 deletions
|
|
@ -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<HoppRESTRequest | HoppRESTResponseOriginalRequest>
|
||||
>,
|
||||
debouncedRes
|
||||
)
|
||||
)
|
||||
)
|
||||
})
|
||||
|
||||
const activeInspections = computed(() =>
|
||||
inspectorRefs.value.flatMap((x) => x?.value ?? [])
|
||||
|
|
|
|||
Loading…
Reference in a new issue