Skip to content

Commit

Permalink
chore: code tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismclarke committed Aug 14, 2024
1 parent a3e8a83 commit ddeba23
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ export class ClimateService extends PicsaAsyncService {
if (stations.length > 0) {
const station = stations.find((station) => station.station_id === activeStationId);
if (station) return station;
else this.notificationService.showErrorNotification(`[Climate Station] data not found: ${activeStationId}`);
else {
this.router.navigate(['climate', 'station']);
this.notificationService.showErrorNotification(`[Climate Station] data not found: ${activeStationId}`);
}
}
// UI components aren't rendered unless station defined so can safely ignore this return type
return null as any;
Expand Down

0 comments on commit ddeba23

Please sign in to comment.