From 790e0f728067466a0530272e51b9378f0f8a7e91 Mon Sep 17 00:00:00 2001 From: Michal Kaliszewski Date: Sat, 2 Dec 2023 12:52:38 +0100 Subject: [PATCH] fix: include 0 index on node get version --- src/types/node.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/node.ts b/src/types/node.ts index 65f644c9..49f2c9f5 100644 --- a/src/types/node.ts +++ b/src/types/node.ts @@ -52,7 +52,7 @@ export abstract class Node extends Encryptable { } getVersion(index?: number): Version { - if (index) { + if (index >= 0) { if (this.versions && this.versions[index]) { return this.versions[index]; } else {