fix(toolbars): Fix error when filtering out duplicate buttons for a button section. (#4618)

This commit is contained in:
Joe Boccanfuso 2025-01-07 08:45:43 -05:00 committed by GitHub
parent 754d6b269d
commit 28cf3a17fa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {