Set fallback for PWA badge count to 0 (removes badge)

This commit is contained in:
Karina Kwiatek 2023-05-30 22:04:39 +02:00
parent 1826da1e0a
commit 5fc481f797
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ export default class extends Controller<HTMLElement> {
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);
}
}