From aa76d5710c4fcb7e5c9f77ed3d0d2065a425cdad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pedro=20Sousa?= Date: Mon, 2 Dec 2024 07:40:17 +0000 Subject: [PATCH] feat(smt): allow ChildNodes to use 0 as entry marker (#354) --- packages/smt/src/smt.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/smt/src/smt.ts b/packages/smt/src/smt.ts index 9a52713e5..25de07c62 100644 --- a/packages/smt/src/smt.ts +++ b/packages/smt/src/smt.ts @@ -294,7 +294,7 @@ export default class SMT { // If the third position of the array is not empty the child nodes // are an entry of the tree. - if (childNodes[2]) { + if (childNodes[2] !== undefined) { if (childNodes[0] === key) { // An entry with the same key was found and // it returns it with the siblings.