Skip to content

Commit 0a5bed7

Browse files
committed
错误处理
1 parent 65aacf8 commit 0a5bed7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/app/service/service_worker/script.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ export class ScriptService {
7979

8080
listenerScriptInstall() {
8181
const handleIncomingUrl = async (targetUrl: string) => {
82-
return await this.getInstallPageUrl(targetUrl, "user");
82+
const url = await this.getInstallPageUrl(targetUrl, "user");
83+
if (!url) throw new Error("getInstallPageUrl failed");
84+
return url;
8385
};
8486

8587
// Runs in MV3 background (service worker)

0 commit comments

Comments
 (0)