try catch error

This commit is contained in:
xu_yanfeng 2025-02-13 16:17:24 +08:00
parent e7283964b4
commit 2e1112f526

View File

@ -95,6 +95,7 @@ export const TipUpdate = "tip-update";
], ],
}, },
]; ];
try {
await githubMirrorMgr.init(); await githubMirrorMgr.init();
const data = await githubMirrorMgr.getData("version.json"); const data = await githubMirrorMgr.getData("version.json");
if (data) { if (data) {
@ -114,6 +115,9 @@ export const TipUpdate = "tip-update";
}); });
} }
} }
} catch (e) {
console.error(e);
}
chrome.notifications.onClicked.addListener((id) => { chrome.notifications.onClicked.addListener((id) => {
const ret = config.find((el) => el.id === id); const ret = config.find((el) => el.id === id);
if (ret) { if (ret) {