From f0b8c0edf5d35d78cfe711bcda196d71d67fa070 Mon Sep 17 00:00:00 2001 From: huzhixiao <381665235@qq.com> Date: Thu, 30 Nov 2023 10:05:38 +0800 Subject: [PATCH] fix: fix render error when group is undefined --- 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) : <>} ); }