removeStaleAlerts() always removes all alerts

Created on 30 January 2023, over 1 year ago

Problem/Motivation

The purpose of removeStaleAlerts() seems to be only removing alerts that are no longer being returned from the endpoint, which makes sense.

However, in practice this function removes all alerts, because the call to .includes() is on the raw endpoint data that is an array of objects. None of theme will match the UUID string being compared.

Steps to reproduce

Turn on automatic refresh of alerts, and create an alert or two. Watch elements get replaced. All will get replaced at the "stale" step.

Proposed resolution

Fix the JavaScript logic to only remove alerts not present in the latest endpoint data.

πŸ› Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bvoynick

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024