diff --git a/src/slick.grid.ts b/src/slick.grid.ts index 71c6c6fd..7cd17721 100644 --- a/src/slick.grid.ts +++ b/src/slick.grid.ts @@ -1801,8 +1801,9 @@ export class SlickGrid = Column, O e multiColumnSort: true, previousSortColumns, sortCols: this.sortColumns.map((col) => { - return { columnId: this.columns[this.getColumnIndex(col.columnId)].id, sortCol: this.columns[this.getColumnIndex(col.columnId)], sortAsc: col.sortAsc }; - }) + const tempCol = this.columns[this.getColumnIndex(col.columnId)]; + return !tempCol ? null : { columnId: tempCol.id, sortCol: tempCol, sortAsc: col.sortAsc }; + }).filter((el) => el) }; }