Skip to content

IDB transaction before store is created #182

@jamime

Description

@jamime

When creating a IDB store for the first time if we attempt to perform an operation on the store _getTransaction fails.

We currently check for if (!this.db) to see if the store has been created. However, this.db could also be an unresolved promise if the open request has not yet completed (i.e. upgrade is still in progress). We don't currently accommodate for this.

this.db should only reference the IDB when it is fully ready to be interacted with, and _getTransaction should be checking to see if it is a promise, if it is it should chain the request so it is fired once the open request completes.

IndexedDB.js:169 Uncaught InvalidStateError: Failed to execute 'transaction' on 'IDBDatabase': A version change transaction is running.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions