From 6251551ded4857a4e2d80cc6b9a2c58ec6f3b3ff Mon Sep 17 00:00:00 2001 From: "bai.jingfeng" Date: Tue, 26 Mar 2024 21:50:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DerrorBoundary=20(#504)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description # Motivation # Key changes - Frontend - Backend # Test plan ## Suggestions ## Underlying risk # Showcase Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachycode/pulls/504 Co-authored-by: bai.jingfeng Co-committed-by: bai.jingfeng --- .../src/client/components/custom-components/ErrorBoundary.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugins/@hera/plugin-core/src/client/components/custom-components/ErrorBoundary.tsx b/packages/plugins/@hera/plugin-core/src/client/components/custom-components/ErrorBoundary.tsx index e7a40f2e7..69ad7161d 100644 --- a/packages/plugins/@hera/plugin-core/src/client/components/custom-components/ErrorBoundary.tsx +++ b/packages/plugins/@hera/plugin-core/src/client/components/custom-components/ErrorBoundary.tsx @@ -1,7 +1,7 @@ import React, { useState, useEffect } from 'react'; import { useTranslation } from '../../locale'; -export const ErrorBoundary = ({ children, fallback }) => { +export const ErrorBoundary = ({ children, fallback = null }) => { const { t } = useTranslation(); const [hasError, setHasError] = useState(false);