Browse Source

fix: trigger on a specific date not working (#707)

Ahmad Kholid 2 years ago
parent
commit
635722863d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/background/index.js

+ 1 - 1
src/background/index.js

@@ -386,7 +386,7 @@ browser.alarms.onAlarm.addListener(async ({ name }) => {
     const [hour, minute] = data.time.split(':');
     const date = dayjs(data.date).hour(hour).minute(minute).second(0);
 
-    const isAfter = dayjs().isAfter(date);
+    const isAfter = dayjs(Date.now() - 60 * 1000).isAfter(date);
     if (isAfter) return;
   }