From 831a3e131f06416b8cd1704c7740b796d5dfdf3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pedro=20Sousa?= Date: Fri, 29 Nov 2024 20:55:28 +0000 Subject: [PATCH] feat(smt): allow ChildNodes to use 0 as entry marker --- 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.