diff --git a/apps/web/src/lib/video-pack-store.ts b/apps/web/src/lib/video-pack-store.ts index 0200b2c7c..8457fc082 100644 --- a/apps/web/src/lib/video-pack-store.ts +++ b/apps/web/src/lib/video-pack-store.ts @@ -113,8 +113,7 @@ function recordHash(record: VideoPackRecord): string { async function getRedis(): Promise { if (redisPromise) return redisPromise; - let promise: Promise; - promise = (async () => { + const promise = (async (): Promise => { const creds = resolveUpstashRedisCredentials(); if (!creds) { return null; @@ -129,9 +128,7 @@ async function getRedis(): Promise { console.error('[video-pack-store] Redis client init failed:', error); // Clear the memoized promise so a transient init failure does not // permanently poison the client, and fall back to the in-memory store. - if (redisPromise === promise) { - redisPromise = null; - } + redisPromise = null; return null; } })();