Skip to content

Commit 616d497

Browse files
committed
Replace forEach with for..of
1 parent 5b0dd48 commit 616d497

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • lib/storage/providers/IDBKeyValProvider

lib/storage/providers/IDBKeyValProvider/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const provider: StorageProvider<UseStore | undefined> = {
5757
const getValues = Promise.all(pairs.map(([key]) => IDB.promisifyRequest<OnyxValue<OnyxKey>>(store.get(key))));
5858

5959
return getValues.then((values) => {
60-
pairs.forEach(([key, value], index) => {
60+
for (const [index, [key, value]] of pairs.entries()) {
6161
if (value === null) {
6262
store.delete(key);
6363
} else {
@@ -68,7 +68,7 @@ const provider: StorageProvider<UseStore | undefined> = {
6868

6969
store.put(newValue, key);
7070
}
71-
});
71+
}
7272

7373
return IDB.promisifyRequest(store.transaction);
7474
});

0 commit comments

Comments
 (0)