Skip to content

Commit b2f547f

Browse files
authored
A typo fix updateneeded in IndexedDB
1 parent 7964b11 commit b2f547f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ db.transaction(store[, type]);
277277
- `readonly` -- can only read, the default.
278278
- `readwrite` -- can only read and write the data, but not create/remove/alter object stores.
279279

280-
There's also `versionchange` transaction type: such transactions can do everything, but we can't create them manually. IndexedDB automatically creates a `versionchange` transaction when opening the database, for `updateneeded` handler. That's why it's a single place where we can update the database structure, create/remove object stores.
280+
There's also `versionchange` transaction type: such transactions can do everything, but we can't create them manually. IndexedDB automatically creates a `versionchange` transaction when opening the database, for `upgradeneeded` handler. That's why it's a single place where we can update the database structure, create/remove object stores.
281281

282282
```smart header="Why are there different types of transactions?"
283283
Performance is the reason why transactions need to be labeled either `readonly` and `readwrite`.

0 commit comments

Comments
 (0)