fix PronounDB crash with new profile in dms, force start dependencies

This commit is contained in:
Vendicated 2022-11-12 15:09:02 +01:00
parent b48c8d8a4a
commit 81edc14070
No known key found for this signature in database
GPG key ID: EC781ADFB93EFFA3
8 changed files with 80 additions and 24 deletions

View file

@ -22,8 +22,13 @@ import { Margins, React } from "../webpack/common";
import { ErrorCard } from "./ErrorCard";
interface Props {
/** Render nothing if an error occurs */
noop?: boolean;
/** Fallback component to render if an error occurs */
fallback?: React.ComponentType<React.PropsWithChildren<{ error: any; message: string; stack: string; }>>;
/** called when an error occurs */
onError?(error: Error, errorInfo: React.ErrorInfo): void;
/** Custom error message */
message?: string;
}
@ -67,6 +72,8 @@ const ErrorBoundary = LazyComponent(() => {
render() {
if (this.state.error === NO_ERROR) return this.props.children;
if (this.props.noop) return null;
if (this.props.fallback)
return <this.props.fallback
children={this.props.children}