mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Merge pull request #873 from vector-im/madlittlemods/log-errors-to-console
Log errors when mounting views to the console for easier reference
This commit is contained in:
commit
07823c2cd7
@ -22,6 +22,9 @@ export function mountView(view: IView, mountArgs?: IMountArgs): ViewNode {
|
||||
try {
|
||||
node = view.mount(mountArgs);
|
||||
} catch (err) {
|
||||
// Log it to the console so it's easy to reference
|
||||
console.error(err);
|
||||
// Then render our error boundary to the DOM
|
||||
node = errorToDOM(err);
|
||||
}
|
||||
return node;
|
||||
|
Loading…
Reference in New Issue
Block a user