Skip to content

Commit d36675e

Browse files
committed
minor fixes
1 parent 8c5fa3a commit d36675e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,9 @@ In order to organize that, the `versionchange` event triggers in such case on th
125125

126126
If we don't listen to `versionchange` event and don't close the old connection, then the second, new connection won't be made. The `openRequest` object will emit the `blocked` event instead of `success`. So the second tab won't work.
127127

128-
Here's the code to correctly handle the parallel upgrade:
128+
Here's the code to correctly handle the parallel upgrade.
129+
130+
It installs `onversionchange` handler after the database is opened, that closes the old connection:
129131

130132
```js
131133
let openRequest = indexedDB.open("store", 2);

0 commit comments

Comments
 (0)