fix(web-probe): harden observe analyze recovery (#780)
Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
@@ -8873,7 +8873,8 @@ function runNodeWebProbeObserveAnalyze(options: NodeWebProbeObserveOptions, spec
|
||||
});
|
||||
}
|
||||
|
||||
function recoverWebObserveAnalyzeTurnDetails(options: NodeWebProbeObserveOptions, spec: HwlabRuntimeLaneSpec, analysis: Record<string, unknown>): Record<string, unknown> {
|
||||
function recoverWebObserveAnalyzeTurnDetails(options: NodeWebProbeObserveOptions, spec: HwlabRuntimeLaneSpec, analysis: Record<string, unknown> | null): Record<string, unknown> | null {
|
||||
if (analysis === null || typeof analysis !== "object") return analysis;
|
||||
const sampleMetrics = record(analysis.sampleMetrics);
|
||||
const hasRounds = Array.isArray(sampleMetrics?.rounds) && sampleMetrics.rounds.length > 0;
|
||||
const hasColumns = Array.isArray(sampleMetrics?.turnColumns) && sampleMetrics.turnColumns.length > 0;
|
||||
|
||||
Reference in New Issue
Block a user