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
This commit is contained in:
fieryhenry 2025-07-18 19:07:41 +00:00 committed by GitHub
parent a84bb1d22e
commit 3335bc8c38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 =
'<span id="notification_count">' + notification_count + '</span> <i class="icon ion-ios-notifications"></i>';