BetterSettings: fix error handling crashing in some niche cases

main
Vendicated 6 months ago
parent 840a8f1fdd
commit a2acce55c3
No known key found for this signature in database
GPG Key ID: D66986BAF75ECF18

@ -131,16 +131,11 @@ export default definePlugin({
// try catch will only catch errors in the Layer function (hence why it's called as a plain function rather than a component), but
// not in children
Layer(props: LayerProps) {
try {
if (!FocusLock || !ComponentDispatch)
throw new Error("Failed to fetch some webpack modules");
return Layer(props);
} catch (e) {
new Logger("BetterSettings").error("Failed to render Layer", e);
if (!FocusLock || !ComponentDispatch) {
new Logger("BetterSettings").error("Failed to find some components");
}
return props.children;
return <Layer {...props} />;
},
wrapMenu(list: SettingsEntry[]) {

Loading…
Cancel
Save