Skip to content

Commit 19ead0b

Browse files
author
Alyar
committed
Fix ts error
1 parent c05ce5a commit 19ead0b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/devextreme/js/__internal/grids/grid_core/ai_column/m_ai_column_cache_controller.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,9 @@ export class AIColumnCacheController extends Controller {
2424
columnName: string,
2525
data: Record<PropertyKey, string>,
2626
): void {
27-
let columnCache = this.cache[columnName];
27+
const columnCache = this.cache[columnName] ?? {};
2828

29-
if (!columnCache) {
30-
columnCache = {};
31-
this.cache[columnName] = columnCache;
32-
}
29+
this.cache[columnName] = columnCache;
3330

3431
Object.entries(data).forEach(([key, value]) => {
3532
columnCache[key] = value;

0 commit comments

Comments
 (0)