-
Notifications
You must be signed in to change notification settings - Fork 80
Open
Labels
Description
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.