File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
frontend/src/app/data-management/alert-management/shared/services Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -32,10 +32,12 @@ export class OpenAlertsService implements OnDestroy {
3232 takeUntil ( this . destroy$ ) ,
3333 switchMap ( ( ) => this . alertOpenStatusService . getOpenAlert ( ) ) ,
3434 tap ( ( response ) => {
35- this . openAlerts = response . body ;
36- this . localStorage . store ( OPEN_ALERTS_KEY , this . openAlerts ) ;
37- if ( this . openAlerts >= 0 && this . openAlerts !== this . openAlerts ) {
38- this . openAlertsBehaviorSubject . next ( this . openAlerts ) ;
35+ const newValue = response . body ;
36+
37+ if ( newValue !== this . openAlerts ) {
38+ this . openAlerts = newValue ;
39+ this . openAlertsBehaviorSubject . next ( newValue ) ;
40+ this . localStorage . store ( OPEN_ALERTS_KEY , newValue ) ;
3941 }
4042 } ) ,
4143 catchError ( ( err ) => {
You can’t perform that action at this time.
0 commit comments