[GH-ISSUE #247] fails silently #158

Closed
opened 2026-03-03 16:05:43 +03:00 by kerem · 0 comments
Owner

Originally created by @ghost on GitHub (Jan 13, 2022).
Original GitHub issue: https://github.com/mthenw/frontail/issues/247

export async function getDb(){
// fails silently
    const db = await openDB("halo", "1", {
        upgrade(db, oldVersion, newVersion, transaction) {
            db.createObjectStore('hello', {
                // The 'id' property of the object will be the key.
                keyPath: 'id',
            });
            db.createObjectStore('store1');
            db.createObjectStore('store2');
            console.log(3333)
        },
    });
    // works
    await openDB('db2', 1, {
        upgrade(db) {
            db.createObjectStore('store1');
            db.createObjectStore('store2');
            console.log(282)
        },
    });
    return db
}

Originally created by @ghost on GitHub (Jan 13, 2022). Original GitHub issue: https://github.com/mthenw/frontail/issues/247 ```js export async function getDb(){ // fails silently const db = await openDB("halo", "1", { upgrade(db, oldVersion, newVersion, transaction) { db.createObjectStore('hello', { // The 'id' property of the object will be the key. keyPath: 'id', }); db.createObjectStore('store1'); db.createObjectStore('store2'); console.log(3333) }, }); // works await openDB('db2', 1, { upgrade(db) { db.createObjectStore('store1'); db.createObjectStore('store2'); console.log(282) }, }); return db } ```
kerem closed this issue 2026-03-03 16:05:43 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/frontail#158
No description provided.