From 51d90e08293b4712c557b06373aa69194002bbbd Mon Sep 17 00:00:00 2001 From: Theodore Kruczek Date: Tue, 19 Dec 2023 14:24:50 -0500 Subject: [PATCH] fix: :rotating_light: fix lint error with undefined check --- src/viewer/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/viewer/index.ts b/src/viewer/index.ts index b573a17..bd5552e 100644 --- a/src/viewer/index.ts +++ b/src/viewer/index.ts @@ -326,7 +326,9 @@ class Viewer { this.orbits?.setSelectedSatellite(satelliteIdx); } - setSelectedSatelliteGroup (satelliteGroup: SatelliteGroup | undefined) { + setSelectedSatelliteGroup (satelliteGroup?: SatelliteGroup) { + if (!satelliteGroup) return; + this.satelliteGroups?.selectGroup(satelliteGroup); this.orbits?.setSatelliteGroup(satelliteGroup); this.satellites?.setSatelliteGroup(satelliteGroup);