Prevent toast interval from never completing

This commit is contained in:
shamoon 2025-02-03 12:38:57 -08:00
parent fb243abdfe
commit d4e6f6dc17

View File

@ -40,7 +40,7 @@ export class ToastComponent {
const delay = toast.delay - 500 // for fade animation
interval(refreshInterval)
.pipe(take(delay / refreshInterval))
.pipe(take(Math.round(delay / refreshInterval)))
.subscribe((count) => {
toast.delayRemaining = Math.max(
0,