summaryrefslogtreecommitdiff
path: root/packages/sw/src
diff options
context:
space:
mode:
authorzyoshoka <107108195+zyoshoka@users.noreply.github.com>2024-04-07 21:14:13 +0900
committerGitHub <noreply@github.com>2024-04-07 21:14:13 +0900
commit959cc8ff37de620bf0082f48f59963c00d045fe9 (patch)
treed1e98d9d4ac77f89fe3d8812a158c7ee997f8596 /packages/sw/src
parentfix(deps): aiscript-vscodeのインストール中にWARNが出るのを修... (diff)
downloadmisskey-959cc8ff37de620bf0082f48f59963c00d045fe9.tar.gz
misskey-959cc8ff37de620bf0082f48f59963c00d045fe9.tar.bz2
misskey-959cc8ff37de620bf0082f48f59963c00d045fe9.zip
refactor(general): use `Date.now()` instead of creating a new `Date` instance (#13671)
Diffstat (limited to 'packages/sw/src')
-rw-r--r--packages/sw/src/sw.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/sw/src/sw.ts b/packages/sw/src/sw.ts
index 46fe9fc90f..cc79d88713 100644
--- a/packages/sw/src/sw.ts
+++ b/packages/sw/src/sw.ts
@@ -76,7 +76,7 @@ globalThis.addEventListener('push', ev => {
case 'notification':
case 'unreadAntennaNote':
// 1日以上経過している場合は無視
- if ((new Date()).getTime() - data.dateTime > 1000 * 60 * 60 * 24) break;
+ if (Date.now() - data.dateTime > 1000 * 60 * 60 * 24) break;
return createNotification(data);
case 'readAllNotifications':