From 3335bc8c388677517e5c4b86eb917fd3fdace2f8 Mon Sep 17 00:00:00 2001
From: fieryhenry <74794355+fieryhenry@users.noreply.github.com>
Date: Fri, 18 Jul 2025 19:07:41 +0000
Subject: [PATCH] Get a count of 0 if STORAGE_KEY_NOTIF_COUNT is not present in
storage
Not sure if this is necessary as I think it should always be present in storage, but just in case it isn't
---
assets/js/notifications.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/assets/js/notifications.js b/assets/js/notifications.js
index b8d73a82..16d9866d 100644
--- a/assets/js/notifications.js
+++ b/assets/js/notifications.js
@@ -77,7 +77,7 @@ function create_notification_stream(subscriptions) {
function update_ticker_count() {
var notification_ticker = document.getElementById('notification_ticker');
- const notification_count = helpers.storage.get(STORAGE_KEY_NOTIF_COUNT);
+ const notification_count = helpers.storage.get(STORAGE_KEY_NOTIF_COUNT) || 0;
if (notification_count > 0) {
notification_ticker.innerHTML =
'' + notification_count + ' ';