refactor(general): use Date.now() instead of creating a new Date instance (#13671)

This commit is contained in:
zyoshoka
2024-04-07 21:14:13 +09:00
committed by GitHub
parent 2f8fb105a5
commit 959cc8ff37
9 changed files with 13 additions and 13 deletions

View File

@@ -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':