From 8102750f5cf8b5a237ec1a6c2dd615174101db36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nora=20Dimitrijevi=C4=87?= Date: Tue, 11 Feb 2025 12:21:06 +0000 Subject: [PATCH] ComparePerformance: fix crash in RTJO mode With `--dynamic-join-order-mode=all`, both `first` and `second` are undefined, leading to a crash. Until RTJO mode gets proper tuple counting, this change prevents a crash when unfurling the steps of a predicate. --- .../src/view/compare-performance/ComparePerformance.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/ql-vscode/src/view/compare-performance/ComparePerformance.tsx b/extensions/ql-vscode/src/view/compare-performance/ComparePerformance.tsx index cff08fb3881..d072310ea9c 100644 --- a/extensions/ql-vscode/src/view/compare-performance/ComparePerformance.tsx +++ b/extensions/ql-vscode/src/view/compare-performance/ComparePerformance.tsx @@ -798,7 +798,7 @@ function PredicateRow(props: PredicateRowProps) { } /> - {abbreviateRASteps(first?.steps ?? second!.steps).map( + {abbreviateRASteps(first?.steps ?? second?.steps ?? []).map( (step, index) => (