fix: runtime error if no buttons are present in toolbar (#4680)
Co-authored-by: Bartek Witczak <bartek@dayone.pl>pull/4672/head
parent
b73b0bcb98
commit
4b4b685bba
|
@ -59,7 +59,7 @@ ButtonsGroup.prototype.addButton = function (button) {
|
||||||
ButtonsGroup.prototype.render = function () {
|
ButtonsGroup.prototype.render = function () {
|
||||||
if (this.buttons && this.buttons.length === 1) {
|
if (this.buttons && this.buttons.length === 1) {
|
||||||
this.buttons[0].grouping = '';
|
this.buttons[0].grouping = '';
|
||||||
} else {
|
} else if (this.buttons && this.buttons.length > 1) {
|
||||||
_.first(this.buttons).grouping = 'grouped-left';
|
_.first(this.buttons).grouping = 'grouped-left';
|
||||||
_.last(this.buttons).grouping = 'grouped-right';
|
_.last(this.buttons).grouping = 'grouped-right';
|
||||||
_.each(this.buttons.slice(1, -1), (btn) => {
|
_.each(this.buttons.slice(1, -1), (btn) => {
|
||||||
|
|
Loading…
Reference in New Issue