From 7c24b2a3e12630ff436aa437135011722d10cfc6 Mon Sep 17 00:00:00 2001 From: Hayden <154503486+groupthinking@users.noreply.github.com> Date: Sun, 6 Sep 2026 02:40:36 -0500 Subject: [PATCH] fix(web): remove Redis promise definite-assignment error --- apps/web/src/lib/video-pack-store.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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; } })();