From fa5203236dd12f190a6e1bd0062ac01417d70920 Mon Sep 17 00:00:00 2001 From: huzhixiao <381665235@qq.com> Date: Thu, 30 Nov 2023 23:28:01 +0800 Subject: [PATCH] fix: fix render error for undefined toolbar group (#13124) --- packages/toolbar/src/browser/toolbar.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/toolbar/src/browser/toolbar.tsx b/packages/toolbar/src/browser/toolbar.tsx index 542210a5d6433..d52a725a511e4 100644 --- a/packages/toolbar/src/browser/toolbar.tsx +++ b/packages/toolbar/src/browser/toolbar.tsx @@ -173,9 +173,9 @@ export class ToolbarImpl extends TabBarToolbar { tabIndex={0} ref={this.assignRef} > - {this.renderColumnWrapper(ToolbarAlignment.LEFT, leftGroups)} - {this.renderColumnWrapper(ToolbarAlignment.CENTER, centerGroups)} - {this.renderColumnWrapper(ToolbarAlignment.RIGHT, rightGroups)} + {leftGroups ? this.renderColumnWrapper(ToolbarAlignment.LEFT, leftGroups) : <>} + {centerGroups ? this.renderColumnWrapper(ToolbarAlignment.CENTER, centerGroups) : <>} + {rightGroups ? this.renderColumnWrapper(ToolbarAlignment.RIGHT, rightGroups) : <>} ); }