Skip to content

Commit

Permalink
refactor: handle uncaught promise error (#36158)
Browse files Browse the repository at this point in the history
Co-authored-by: daief <1437931235@qq.com>

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: daief <1437931235@qq.com>
  • Loading branch information
trop[bot] and daief committed Oct 27, 2022
1 parent 9870a31 commit fa9ffa7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/renderer/web-view/web-view-attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ export class SrcAttribute extends WebViewAttribute {
opts.userAgent = useragent;
}

(this.webViewImpl.webviewNode as Electron.WebviewTag).loadURL(this.getValue(), opts);
(this.webViewImpl.webviewNode as Electron.WebviewTag).loadURL(this.getValue(), opts)
.catch(err => {
console.error('Unexpected error while loading URL', err);
});
}
}

Expand Down

0 comments on commit fa9ffa7

Please sign in to comment.