From 28cf3a17fad5070ba00d0d5d27633237b499da7a Mon Sep 17 00:00:00 2001 From: Joe Boccanfuso <109477394+jbocce@users.noreply.github.com> Date: Tue, 7 Jan 2025 08:45:43 -0500 Subject: [PATCH] fix(toolbars): Fix error when filtering out duplicate buttons for a button section. (#4618) --- platform/core/src/services/ToolBarService/ToolbarService.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/platform/core/src/services/ToolBarService/ToolbarService.ts b/platform/core/src/services/ToolBarService/ToolbarService.ts index 11d5383f2..cd8b042a1 100644 --- a/platform/core/src/services/ToolBarService/ToolbarService.ts +++ b/platform/core/src/services/ToolBarService/ToolbarService.ts @@ -391,9 +391,8 @@ export default class ToolbarService extends PubSubService { createButtonSection(key, buttons) { if (this.state.buttonSections[key]) { this.state.buttonSections[key].push( - buttons.filter( - button => - !this.state.buttonSections[key].find(sectionButton => sectionButton.id === button.id) + ...buttons.filter( + button => !this.state.buttonSections[key].find(sectionButton => sectionButton === button) ) ); } else {