diff options
| author | zyoshoka <107108195+zyoshoka@users.noreply.github.com> | 2024-08-30 15:53:04 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-30 15:53:04 +0900 |
| commit | 8be624aa4441dbbc3f911453d22b70dee8a685b5 (patch) | |
| tree | e462548621295abd588559d01ddf434e45c2c191 /packages/sw/src/sw.ts | |
| parent | fix(frontend): server metrics look strange after reload (#14467) (diff) | |
| download | sharkey-8be624aa4441dbbc3f911453d22b70dee8a685b5.tar.gz sharkey-8be624aa4441dbbc3f911453d22b70dee8a685b5.tar.bz2 sharkey-8be624aa4441dbbc3f911453d22b70dee8a685b5.zip | |
refactor(sw): fix type errors (#14478)
* style(sw): lint fixes
* refactor(sw): fix type errors
* chore(sw): disable `noImplicitAny`
* ci(sw): enable typecheck ci
* ci(sw): build `misskey-js` before typecheck
Diffstat (limited to 'packages/sw/src/sw.ts')
| -rw-r--r-- | packages/sw/src/sw.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/sw/src/sw.ts b/packages/sw/src/sw.ts index 7a0010992e..2d39d23ec7 100644 --- a/packages/sw/src/sw.ts +++ b/packages/sw/src/sw.ts @@ -160,8 +160,8 @@ globalThis.addEventListener('notificationclick', (ev: ServiceWorkerGlobalScopeEv case 'markAllAsRead': await globalThis.registration.getNotifications() .then(notifications => notifications.forEach(n => n.tag !== 'read_notification' && n.close())); - await get('accounts').then(accounts => { - return Promise.all(accounts.map(async account => { + await get<Pick<Misskey.entities.SignupResponse, 'id' | 'token'>[]>('accounts').then(accounts => { + return Promise.all((accounts ?? []).map(async account => { await swos.sendMarkAllAsRead(account.id); })); }); |