From 8350bef37b7238ed012c441b77f881ab576c07aa Mon Sep 17 00:00:00 2001 From: SuZhou-Joe Date: Wed, 20 Mar 2024 11:07:42 +0800 Subject: [PATCH] feat: add protection Signed-off-by: SuZhou-Joe --- src/plugins/workspace/public/application.tsx | 2 +- src/plugins/workspace/public/plugin.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/workspace/public/application.tsx b/src/plugins/workspace/public/application.tsx index a6f496304889..f70c627e02b0 100644 --- a/src/plugins/workspace/public/application.tsx +++ b/src/plugins/workspace/public/application.tsx @@ -15,7 +15,7 @@ export const renderFatalErrorApp = (params: AppMountParameters, services: Servic const history = params.history as ScopedHistory<{ error?: string }>; ReactDOM.render( - + , element ); diff --git a/src/plugins/workspace/public/plugin.ts b/src/plugins/workspace/public/plugin.ts index 8289351e0721..e3ecdc34bfb9 100644 --- a/src/plugins/workspace/public/plugin.ts +++ b/src/plugins/workspace/public/plugin.ts @@ -55,7 +55,7 @@ export class WorkspacePlugin implements Plugin<{}, {}, {}> { application.navigateToApp(WORKSPACE_FATAL_ERROR_APP_ID, { replace: true, state: { - error: result.error, + error: result?.error, }, }); })();