diff --git a/view/adminhtml/templates/script/component-partial/columns-selector-component-partial.phtml b/view/adminhtml/templates/script/component-partial/columns-selector-component-partial.phtml index 3de5de2..3a8ac54 100644 --- a/view/adminhtml/templates/script/component-partial/columns-selector-component-partial.phtml +++ b/view/adminhtml/templates/script/component-partial/columns-selector-component-partial.phtml @@ -12,9 +12,11 @@ use Magento\Framework\View\Element\Template; activeColumns: null, initActiveColumns() { this.activeColumns = new Set(); - this.columns.forEach(column => { - this.activeColumns.add(column.code); - }) + if (Array.isArray(this.columns)) { + this.columns.forEach(column => { + this.activeColumns.add(column.code); + }) + } }, isColumnActive() { const columnName = this.$el.getAttribute('data-column'); diff --git a/view/adminhtml/templates/script/component-type/grid-component-type.phtml b/view/adminhtml/templates/script/component-type/grid-component-type.phtml index de4ef0d..6e34d3f 100644 --- a/view/adminhtml/templates/script/component-type/grid-component-type.phtml +++ b/view/adminhtml/templates/script/component-type/grid-component-type.phtml @@ -17,7 +17,7 @@ use Magento\Framework\View\Element\Template; ...LokiAdminFiltersComponentPartial, ...LokiAdminMassActionsComponentPartial, ...LokiComponentType, - columns: {}, + columns: [], columnPositions: {}, showOtherActions: false, gridFilters: {},