From ae2a4ddbcc4a5f36afd4a82a7151100d391f5f3e Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Mon, 21 Nov 2022 12:50:21 +0200 Subject: [PATCH] fix error boundary --- src/util/ErrorBoundary.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/ErrorBoundary.js b/src/util/ErrorBoundary.js index c848ffe..6ecbe93 100644 --- a/src/util/ErrorBoundary.js +++ b/src/util/ErrorBoundary.js @@ -8,12 +8,12 @@ class ErrorBoundary extends React.Component { } componentDidCatch(error, errorInfo) { - this.sate.error = true; - console.log(error, errorInfo); + this.setState({error: true}); + console.error(error, errorInfo); } render() { - if (this.state.error) return

Something went wrong :(

; + if (this.state.error) return

Something went wrong :/

; return this.props.children; }