From 143ba5dc15ba86b5788bf9e6990609ea9e3f939f Mon Sep 17 00:00:00 2001 From: Dustin Loring Date: Sun, 1 Dec 2024 09:46:41 -0500 Subject: [PATCH] hotfix for test and lint done --- app/lib/persistence/db.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/lib/persistence/db.ts b/app/lib/persistence/db.ts index 6ce604d..40c5cc7 100644 --- a/app/lib/persistence/db.ts +++ b/app/lib/persistence/db.ts @@ -6,6 +6,11 @@ const logger = createScopedLogger('ChatHistory'); // this is used at the top level and never rejects export async function openDatabase(): Promise { + if (typeof indexedDB === 'undefined') { + console.error('indexedDB is not available in this environment.'); + return undefined; + } + return new Promise((resolve) => { const request = indexedDB.open('boltHistory', 1);