Prevent invalid YAML config from bricking the UI

This commit is contained in:
Zaid Abdulla committed 2021-09-16 13:27:37 -07:00
1 parent 98698b775c
commit 529386a9b6
3 files changed
+12 -5

No files matched your search

+8 -1
View File
@@ -144,7 +144,14 @@ export function contextifyComponent(component: ComponentTypes): ComponentTypes {
applyContext(res, context);
return res;
} catch (err) {
return m("p.error", { title: err.message }, "Error!");
return m(
"p.error",
{
title: "Click to print stack trace to console",
onclick: () => console.error(err),
},
"Error!"
);
}
};
return state;