diff --git a/docker/frontend/src/engine/session.ts b/docker/frontend/src/engine/session.ts index 9adef23..696f07e 100644 --- a/docker/frontend/src/engine/session.ts +++ b/docker/frontend/src/engine/session.ts @@ -59,9 +59,14 @@ export function saveState(state: StudioState): void { } // --- the photo: IndexedDB, because a 12MP JPEG does not fit in localStorage --- +// The version is not this file's to name: the frame store shares this database +// and raises it (see `customFrame.ts`, which adds `custom_frames` and keeps this +// store on the way). Asking for a number of our own is a gate we fail at the +// moment the other store has gone past it — `VersionError`, on every read and +// every write, and a session photo that silently never survives a reload. function openDb(): Promise { return new Promise((resolve, reject) => { - const req = indexedDB.open(DB_NAME, 1); + const req = indexedDB.open(DB_NAME); req.onupgradeneeded = () => req.result.createObjectStore(STORE); req.onsuccess = () => resolve(req.result); req.onerror = () => reject(req.error);