From fd8dbe44e9c71dba2fb95255edf1c69b70694dbc Mon Sep 17 00:00:00 2001 From: ghiscoding Date: Mon, 23 Oct 2023 22:47:47 -0400 Subject: [PATCH] fix: make sure rowNode exists before trying to loop on it --- src/slick.grid.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/slick.grid.ts b/src/slick.grid.ts index 3e7bf5b0..4e5b535a 100644 --- a/src/slick.grid.ts +++ b/src/slick.grid.ts @@ -3975,6 +3975,10 @@ export class SlickGrid = Column, O e }); } } + + if (!cacheEntry.rowNode) { + cacheEntry.rowNode = []; + } this.postProcessedCleanupQueue.push({ actionType: 'R', groupId: this.postProcessgroupId, @@ -3996,7 +4000,7 @@ export class SlickGrid = Column, O e protected removeRowFromCache(row: number) { const cacheEntry = this.rowsCache[row]; - if (!cacheEntry) { + if (!cacheEntry || !cacheEntry.rowNode) { return; }