mthenw/frontail

fails silently

reemaadeniyi opened this issue · 0 comments

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
}