Skip to content

Commit b11324a

Browse files
committed
grid.View: getColumnCells() => only add cells in case they exist #6383
1 parent 479653b commit b11324a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/grid/View.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ class GridView extends Component {
658658
firstRow = vdomRoot.cn[0],
659659
i = 0,
660660
len = firstRow.cn.length,
661-
columnIndex;
661+
cell, columnIndex;
662662

663663
// Columns might get moved via drag&drop, so let's check for the current match
664664
for (; i < len; i++) {
@@ -669,7 +669,8 @@ class GridView extends Component {
669669
}
670670

671671
vdomRoot.cn.forEach(row => {
672-
cells.push(row.cn[columnIndex])
672+
cell = row.cn[columnIndex];
673+
cell && cells.push(cell)
673674
});
674675

675676
return cells

0 commit comments

Comments
 (0)