Skip to content

Commit 76d813e

Browse files
committed
fix: don't discard node response with index 0 due to being a falsy value in JS
1 parent 4f2ba1b commit 76d813e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/lit-node-client-nodejs/src/lib/lit-node-client-nodejs.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1934,7 +1934,11 @@ export class LitNodeClientNodeJs
19341934
for (const field of requiredFields) {
19351935
const key: keyof BlsResponseData = field as keyof BlsResponseData;
19361936

1937-
if (!data[key] || data[key] === '') {
1937+
if (
1938+
data[key] === undefined ||
1939+
data[key] === null ||
1940+
data[key] === ''
1941+
) {
19381942
log(
19391943
`[signSessionKey] Invalid signed data. "${field}" is missing. Not a problem, we only need ${this.config.minNodeCount} nodes to sign the session key.`
19401944
);

0 commit comments

Comments
 (0)