Skip to content

Commit 2a00342

Browse files
authored
Merge pull request #7 from JackyHe398/beta
fix(compatibility): change storing type of lastDate from date object …
2 parents 4099ada + bcfc960 commit 2a00342

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/background.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getConfig, resetConfig } from "./configHelper";
1+
import { getConfig } from "./configHelper";
22
import { checkSignCondition } from "./SignHelper";
33

44

@@ -126,7 +126,7 @@ chrome.runtime.onMessage.addListener((msg, sender) => {
126126
});
127127

128128
// reset the lastDate
129-
chrome.storage.sync.set({ lastDate: new Date(0) }, () => {
129+
chrome.storage.sync.set({ lastDate: new Date(0).toISOString() }, () => {
130130
console.log(`✅ Debug: lastDate reset`);
131131
});
132132
}

src/content.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { SignHelper, checkSignCondition } from "./SignHelper";
1+
import { SignHelper } from "./SignHelper";
22

33
const closeTabAndSetDate = async () => {
44
//簽到後用目前時間覆蓋掉上次時間,防止重複開啟網頁
5-
await chrome.storage.sync.set({lastDate: new Date()});
5+
await chrome.storage.sync.set({lastDate: new Date().toISOString()});
66
chrome.runtime.sendMessage({ action: "close_after_check" });
77
}
88

0 commit comments

Comments
 (0)