Skip to content

Commit

Permalink
toolbar.Base: insert() => allow adding spacers dynamically #6118
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiu committed Nov 18, 2024
1 parent fb88633 commit 17ca571
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/toolbar/Base.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class Base extends Container {
let items = this._items;

if (Array.isArray(items)) {
items.map(item => this.replaceSpacer(item))
this._items = items.map(item => this.replaceSpacer(item))
}

return super.createItems()
Expand Down Expand Up @@ -206,7 +206,7 @@ class Base extends Container {
*/
insert(index, item, silent=false) {
if (Array.isArray(item)) {
item.map(item => this.replaceSpacer(item))
item = item.map(item => this.replaceSpacer(item))
} else {
item = this.replaceSpacer(item)
}
Expand Down

0 comments on commit 17ca571

Please sign in to comment.