Explorar o código

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

Ahmad Kholid %!s(int64=3) %!d(string=hai) anos
pai
achega
635722863d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;
   }