|
|
@ -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
|
|
|
|
// 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
|
|
|
|
// not in children
|
|
|
|
Layer(props: LayerProps) {
|
|
|
|
Layer(props: LayerProps) {
|
|
|
|
try {
|
|
|
|
if (!FocusLock || !ComponentDispatch) {
|
|
|
|
if (!FocusLock || !ComponentDispatch)
|
|
|
|
new Logger("BetterSettings").error("Failed to find some components");
|
|
|
|
throw new Error("Failed to fetch some webpack modules");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Layer(props);
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
new Logger("BetterSettings").error("Failed to render Layer", e);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return props.children;
|
|
|
|
return <Layer {...props} />;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
wrapMenu(list: SettingsEntry[]) {
|
|
|
|
wrapMenu(list: SettingsEntry[]) {
|
|
|
|