Skip to content

Commit 7c4b25f

Browse files
committed
错误处理加一下
1 parent 1b9c712 commit 7c4b25f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/app/service/service_worker/script.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ export class ScriptService {
222222
public async openInstallPageByUrl(url: string, source: InstallSource): Promise<{ success: boolean; msg: string }> {
223223
try {
224224
const installPageUrl = await this.getInstallPageUrl(url, source);
225+
if (!installPageUrl) throw new Error("getInstallPageUrl failed");
225226
await openInCurrentTab(installPageUrl);
226227
return { success: true, msg: "" };
227228
} catch (err: any) {

0 commit comments

Comments
 (0)