From 4566d9abfeb7fa190de111934252a6da02a284fd Mon Sep 17 00:00:00 2001 From: Dustin Loring Date: Sun, 1 Dec 2024 09:24:46 -0500 Subject: [PATCH] last test fix --- 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 6ce604d9a..45418ffa4 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);