Skip to content

Commit

Permalink
last test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinwloring1988 committed Dec 1, 2024
1 parent 6aaa2f0 commit 4566d9a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/lib/persistence/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ const logger = createScopedLogger('ChatHistory');

// this is used at the top level and never rejects
export async function openDatabase(): Promise<IDBDatabase | undefined> {
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);

Expand Down

0 comments on commit 4566d9a

Please sign in to comment.