Skip to content

Commit bebec5f

Browse files
authored
fix: make sure rowNode exists before trying to loop on it (#877)
1 parent 3987789 commit bebec5f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/slick.grid.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3975,6 +3975,10 @@ export class SlickGrid<TData = any, C extends Column<TData> = Column<TData>, O e
39753975
});
39763976
}
39773977
}
3978+
3979+
if (!cacheEntry.rowNode) {
3980+
cacheEntry.rowNode = [];
3981+
}
39783982
this.postProcessedCleanupQueue.push({
39793983
actionType: 'R',
39803984
groupId: this.postProcessgroupId,
@@ -3996,7 +4000,7 @@ export class SlickGrid<TData = any, C extends Column<TData> = Column<TData>, O e
39964000

39974001
protected removeRowFromCache(row: number) {
39984002
const cacheEntry = this.rowsCache[row];
3999-
if (!cacheEntry) {
4003+
if (!cacheEntry || !cacheEntry.rowNode) {
40004004
return;
40014005
}
40024006

0 commit comments

Comments
 (0)