fix(toolbars): Fix error when filtering out duplicate buttons for a button section. (#4618)
This commit is contained in:
parent
754d6b269d
commit
28cf3a17fa
@ -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 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user