From fb3ce985531a60c5735b03283899dde9f9dac2bd Mon Sep 17 00:00:00 2001 From: Marco Salazar Date: Tue, 11 Jun 2024 14:29:45 -0400 Subject: [PATCH] fix undefined check --- .../ui-core/src/runs/HourlyDataCache/HourlyDataCache.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js_modules/dagster-ui/packages/ui-core/src/runs/HourlyDataCache/HourlyDataCache.tsx b/js_modules/dagster-ui/packages/ui-core/src/runs/HourlyDataCache/HourlyDataCache.tsx index 03b0ae5179544..65b20e2f304bd 100644 --- a/js_modules/dagster-ui/packages/ui-core/src/runs/HourlyDataCache/HourlyDataCache.tsx +++ b/js_modules/dagster-ui/packages/ui-core/src/runs/HourlyDataCache/HourlyDataCache.tsx @@ -50,6 +50,7 @@ export class HourlyDataCache { return; } if (!(await this.indexedDBCache.has(this.indexedDBKey))) { + console.log('not has'); res(); return; } @@ -65,7 +66,7 @@ export class HourlyDataCache { private saveTimeout?: ReturnType; private registeredUnload: boolean = false; private async saveCacheToIndexedDB() { - if (typeof jest !== undefined) { + if (typeof jest !== 'undefined') { if (!this.indexedDBCache) { return; } @@ -77,6 +78,7 @@ export class HourlyDataCache { if (!this.indexedDBCache) { return; } + debugger; this.indexedDBCache.set(this.indexedDBKey, this.cache, defaultOptions); }, 10000); if (!this.registeredUnload) {