Open aral opened 6 years ago
Think this is the native async/await issue. This hello-world example was written when no browser or node version had support for it, so it was expected to be transpiled. See https://github.com/dfahlander/Dexie.js/issues/317. Today the sample would work without transpilation in chrome, edge and safari only. Not Firefox (yet, what I know), and not IndexedDBShim.
Note: This issue should only apply when using transactions. Transactionless code can use native async/await. Could be tested on the shim by skipping the transaction block around the code and replace it with a simple async function.
Clarification: Dexie itself handles native async/await but certain browsers, including Firefox v<=60 and Indexeddbshim trigger transaction commit too early when using it.
A slightly modified (using IndexedDBShim and
console.log
instead ofalert()
) version of the Hello, world ES6/ES7 example that uses transactions is failing under Node.js.To reproduce
After linking in the latest Dexie and IndexedDBShim, run:
Error
This appears to be the same error we’re seeing in tests-asyncawait, assertion 12 (#709).