Skip to content

Commit 1beb02b

Browse files
[gui] Add optional chaining to statistics panels
Panel is null before mounted, optional chaining makes sure it is only used if it becomes mounted thus non-null
1 parent fa5e649 commit 1beb02b

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

web/server/vue-cli/src/components/Report/ReportFilter/ReportFilter.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -836,17 +836,17 @@ function renamePresetDialog() {
836836
837837
function syncGroupPanels() {
838838
activeBaselinePanelId.value =
839-
baselineRunFilterRef.value.panel ||
840-
baselineOpenReportsDateFilterRef.value.panel ? 0 : undefined;
839+
baselineRunFilterRef.value?.panel ||
840+
baselineOpenReportsDateFilterRef.value?.panel ? 0 : undefined;
841841
842842
activeCompareToPanelId.value =
843-
comparedToRunFilterRef.value.panel ||
844-
comparedToOpenReportsDateFilterRef.value.panel ||
845-
comparedToDiffTypeFilterRef.value.panel ? 0 : undefined;
843+
comparedToRunFilterRef.value?.panel ||
844+
comparedToOpenReportsDateFilterRef.value?.panel ||
845+
comparedToDiffTypeFilterRef.value?.panel ? 0 : undefined;
846846
847847
activeDatePanelId.value =
848-
detectionDateFilterRef.value.panel ||
849-
fixDateFilterRef.value.panel ? 0 : undefined;
848+
detectionDateFilterRef.value?.panel ||
849+
fixDateFilterRef.value?.panel ? 0 : undefined;
850850
}
851851
852852
// helper functions

0 commit comments

Comments
 (0)