Skip to content

Commit 7c95f38

Browse files
committed
fix: error in handling __forceClose with nullish database name
1 parent 87a6623 commit 7c95f38

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/IDBFactory.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,9 +1028,10 @@ IDBFactory.prototype.__forceClose = function (dbName, connIdx, msg) {
10281028
conn.__forceClose(msg);
10291029
}
10301030
if (util.isNullish(dbName)) {
1031-
(Object.values(me.__connections)).forEach((conn) => {
1032-
// @ts-expect-error It's ok
1033-
forceClose(conn);
1031+
(Object.values(me.__connections)).forEach((connections) => {
1032+
connections.forEach((connection) => {
1033+
forceClose(connection);
1034+
});
10341035
});
10351036
} else if (!me.__connections[dbName]) {
10361037
console.log('No database connections with that name to force close');

0 commit comments

Comments
 (0)