Update 6-data-storage/03-indexeddb/article.md

Co-authored-by: Muhammed Zakir <8190126+MuhammedZakir@users.noreply.github.com>
This commit is contained in:
Peter Kampjes 2020-09-18 14:43:52 -03:00 committed by GitHub
parent d56c49ee48
commit 172ef78b47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -343,7 +343,7 @@ So, in the example above no special call is needed to finish the transaction.
Transactions auto-commit principle has an important side effect. We can't insert an async operation like `fetch`, `setTimeout` in the middle of transaction. IndexedDB will not keep the transaction waiting till these are done. Transactions auto-commit principle has an important side effect. We can't insert an async operation like `fetch`, `setTimeout` in the middle of transaction. IndexedDB will not keep the transaction waiting till these are done.
In the code below `request2` in line `(*)` fails, because the transaction is already committed, and can't make any request in it: In the code below, `request2` in line `(*)` fails, because the transaction is already committed, and can't make any request in it:
```js ```js
let request1 = books.add(book); let request1 = books.add(book);