Skip to content

get set del can throw sync and do not always return a promise #179

@minht11

Description

@minht11

We noticed in Sentry reports that some users in Safari ios 18.4.1 were having errors [Can't find variable: indexedDB], but thats not what this issue is about.

Right now get set methods can throw sync:

console.log('Start')

// Simulate browser not supporting indexed db
delete globalThis.indexedDB

// Should not throw sync
get('any').catch(() => {
 console.log('Error')
})

console.log('End')

Reproduction https://jsfiddle.net/edtxc8k6/

Ideally get and other methods would always resolve promise, throwing sync is unexpected behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions