aboutsummaryrefslogtreecommitdiff
path: root/packages/idb-bridge/src
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-11-19 19:27:26 +0100
committerFlorian Dold <florian.dold@gmail.com>2019-11-19 19:36:32 +0100
commitfaedf697626dd37f3ac74ad4cac1ec378598bbf3 (patch)
tree689baa2997544d98305f8ea4241e6dc5784e013f /packages/idb-bridge/src
parentd9297f3dfddd5c7b072b46dee984251e3202ad75 (diff)
idb-bridge: fix typo in rollback
Diffstat (limited to 'packages/idb-bridge/src')
-rw-r--r--packages/idb-bridge/src/MemoryBackend.ts2
-rw-r--r--packages/idb-bridge/src/tree/b+tree.ts4
2 files changed, 3 insertions, 3 deletions
diff --git a/packages/idb-bridge/src/MemoryBackend.ts b/packages/idb-bridge/src/MemoryBackend.ts
index 99582a1b6..bb13a0223 100644
--- a/packages/idb-bridge/src/MemoryBackend.ts
+++ b/packages/idb-bridge/src/MemoryBackend.ts
@@ -1445,7 +1445,7 @@ export class MemoryBackend implements Backend {
objectStore.modifiedKeyGenerator = undefined;
objectStore.modifiedIndexes = {};
- for (const indexName in Object.keys(
+ for (const indexName of Object.keys(
db.committedSchema.objectStores[objectStoreName].indexes,
)) {
const index = objectStore.committedIndexes[indexName];
diff --git a/packages/idb-bridge/src/tree/b+tree.ts b/packages/idb-bridge/src/tree/b+tree.ts
index 01187cdc2..783c6b049 100644
--- a/packages/idb-bridge/src/tree/b+tree.ts
+++ b/packages/idb-bridge/src/tree/b+tree.ts
@@ -823,7 +823,7 @@ if (Symbol && Symbol.iterator) // iterator is equivalent to entries()
(BTree as any).prototype.setRange = BTree.prototype.setPairs;
(BTree as any).prototype.add = BTree.prototype.set;
-function iterator<T>(next: () => {done:boolean,value?:T} = (() => ({ done:true, value:undefined }))): IterableIterator<T> {
+function iterator<T>(next: () => {done?:boolean,value?:T} = (() => ({ done:true, value:undefined }))): IterableIterator<T> {
var result: any = { next };
if (Symbol && Symbol.iterator)
result[Symbol.iterator] = function() { return this; };
@@ -1348,4 +1348,4 @@ function check(fact: boolean, ...args: any[]) {
}
/** A BTree frozen in the empty state. */
-export const EmptyBTree = (() => { let t = new BTree(); t.freeze(); return t; })(); \ No newline at end of file
+export const EmptyBTree = (() => { let t = new BTree(); t.freeze(); return t; })();