@peerbit/indexer-simple
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -135,6 +135,9 @@ import { deserialize, serialize } from "@dao-xyz/borsh"; | ||
let sum = undefined; | ||
for (const doc of await this.queryAll(query)) { | ||
outer: for (const doc of await this.queryAll(query)) { | ||
let value = doc.value; | ||
for (const path of query.key) { | ||
value = value[path]; | ||
if (!value) { | ||
continue outer; | ||
} | ||
} | ||
@@ -141,0 +144,0 @@ if (typeof value === "number") { |
{ | ||
"name": "@peerbit/indexer-simple", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Simple in memory index for document store", | ||
@@ -64,4 +64,4 @@ "sideEffects": false, | ||
"devDependencies": { | ||
"@peerbit/indexer-tests": "^1.0.0" | ||
"@peerbit/indexer-tests": "^1.0.1" | ||
} | ||
} |
@@ -170,6 +170,9 @@ import { deserialize, serialize } from "@dao-xyz/borsh"; | ||
let sum: undefined | number | bigint = undefined; | ||
for (const doc of await this.queryAll(query)) { | ||
outer: for (const doc of await this.queryAll(query)) { | ||
let value: any = doc.value; | ||
for (const path of query.key) { | ||
value = value[path]; | ||
if (!value) { | ||
continue outer; | ||
} | ||
} | ||
@@ -176,0 +179,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
998
48889
6