Skip to content

Commit

Permalink
Fixed (ui): Fixed a case when removing the first hidden toolbar butto…
Browse files Browse the repository at this point in the history
…n would throw an exception. Closes #7655.
  • Loading branch information
mlewand committed Jul 20, 2020
1 parent 7bcdb94 commit 3ba6a27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ckeditor5-ui/src/toolbar/toolbarview.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ class DynamicGrouping {

// Removing.
for ( const removedItem of changeData.removed ) {
if ( index > this.ungroupedItems.length ) {
if ( index >= this.ungroupedItems.length ) {
this.groupedItems.remove( removedItem );
} else {
this.ungroupedItems.remove( removedItem );
Expand Down

0 comments on commit 3ba6a27

Please sign in to comment.