mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-04-18 16:08:42 +00:00
try catch error
This commit is contained in:
parent
e7283964b4
commit
2e1112f526
@ -95,24 +95,28 @@ export const TipUpdate = "tip-update";
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
await githubMirrorMgr.init();
|
try {
|
||||||
const data = await githubMirrorMgr.getData("version.json");
|
await githubMirrorMgr.init();
|
||||||
if (data) {
|
const data = await githubMirrorMgr.getData("version.json");
|
||||||
const info = data as { ver: string };
|
if (data) {
|
||||||
const b = gt(info.ver || "0.0.0", PKG.manifest.version);
|
const info = data as { ver: string };
|
||||||
if (info.ver && b) {
|
const b = gt(info.ver || "0.0.0", PKG.manifest.version);
|
||||||
config.push({
|
if (info.ver && b) {
|
||||||
id: "update",
|
config.push({
|
||||||
title: `${PKG.manifest.name}发现新版本${info.ver || ""}`,
|
id: "update",
|
||||||
message: `点击查看`,
|
title: `${PKG.manifest.name}发现新版本${info.ver || ""}`,
|
||||||
click: () => {
|
message: `点击查看`,
|
||||||
goRate();
|
click: () => {
|
||||||
},
|
goRate();
|
||||||
check: async () => {
|
},
|
||||||
return true;
|
check: async () => {
|
||||||
},
|
return true;
|
||||||
});
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} 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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user