refactor: handle uncaught promise error (#35484)
This commit is contained in:
parent
ff3289d260
commit
ff4816367e
1 changed files with 4 additions and 1 deletions
|
@ -186,7 +186,10 @@ export class SrcAttribute extends WebViewAttribute {
|
||||||
opts.userAgent = useragent;
|
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);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue