From eb80f9758e403193c7938a355aeed59c74c46c90 Mon Sep 17 00:00:00 2001 From: Krychaxp <55843050+krychaxp@users.noreply.github.com> Date: Sun, 27 Aug 2023 14:59:42 +0200 Subject: [PATCH] Update error-handling.mdx remove unnecessary if/else --- app/pages/docs/error-handling.mdx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/app/pages/docs/error-handling.mdx b/app/pages/docs/error-handling.mdx index 0081ef7b..5fbbb09c 100644 --- a/app/pages/docs/error-handling.mdx +++ b/app/pages/docs/error-handling.mdx @@ -84,21 +84,23 @@ export default function App({ Component, pageProps }: AppProps) { function RootErrorFallback({ error, resetErrorBoundary }) { if (error.name === "AuthenticationError") { return - } else if (error.name === "AuthorizationError") { + } + + if (error.name === "AuthorizationError") { return ( ) - } else { - return ( - - ) } + + return ( + + ) } ```