diff --git a/app/javascript/retrospring/controllers/pwa_badge_controller.ts b/app/javascript/retrospring/controllers/pwa_badge_controller.ts index 3fccef3f..491d0216 100644 --- a/app/javascript/retrospring/controllers/pwa_badge_controller.ts +++ b/app/javascript/retrospring/controllers/pwa_badge_controller.ts @@ -11,7 +11,7 @@ export default class extends Controller { connect(): void { if (this.isPwa && this.badgeCapable) { - const count = Number.parseInt(this.element.innerText); + const count = Number.parseInt(this.element.innerText) || 0; navigator.setAppBadge(count); } }