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) {
|
createButtonSection(key, buttons) {
|
||||||
if (this.state.buttonSections[key]) {
|
if (this.state.buttonSections[key]) {
|
||||||
this.state.buttonSections[key].push(
|
this.state.buttonSections[key].push(
|
||||||
buttons.filter(
|
...buttons.filter(
|
||||||
button =>
|
button => !this.state.buttonSections[key].find(sectionButton => sectionButton === button)
|
||||||
!this.state.buttonSections[key].find(sectionButton => sectionButton.id === button.id)
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user