forked from FoundKeyGang/FoundKey
client: translate comments
This commit is contained in:
parent
a3468491a7
commit
0c3c855d29
1 changed files with 5 additions and 5 deletions
|
@ -33,14 +33,14 @@ export async function initializeSw() {
|
|||
})
|
||||
// When subscribe failed
|
||||
.catch(async (err: Error) => {
|
||||
// 通知が許可されていなかったとき
|
||||
// when notifications were not authorized
|
||||
if (err.name === 'NotAllowedError') {
|
||||
return;
|
||||
}
|
||||
|
||||
// 違うapplicationServerKey (または gcm_sender_id)のサブスクリプションが
|
||||
// 既に存在していることが原因でエラーになった可能性があるので、
|
||||
// そのサブスクリプションを解除しておく
|
||||
// The error may have been caused by the fact that a subscription to a
|
||||
// different applicationServerKey (or gcm_sender_id) already exists, so
|
||||
// unsubscribe to it.
|
||||
const subscription = await registration.pushManager.getSubscription();
|
||||
if (subscription) subscription.unsubscribe();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue