2642844c27
We ran into issues when doing async operations inside of an IndexedDB `onupgradeneeded` handler. The errors were ‘The transaction is not active’ or ‘Transaction has finished’. The following documentation confirmed that transactions are committed/terminated when control returns to the event loop: Spec - https://www.w3.org/TR/IndexedDB/#transaction-lifetime-concept - https://www.w3.org/TR/IndexedDB/#upgrade-transaction-construct Stack Overflow - https://stackoverflow.com/a/11059085 - https://stackoverflow.com/a/27338944 Since the initial database migration is so critical, I decided to avoid `idb` with promise support for IndexedDB for now, but will reconsider using it for other tasks in the future to improve readability of IndexedDB code. |
||
---|---|---|
.. | ||
index.js |