From bd108376ba33bb3c6b5c25606c5ed032e292e911 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 2 Sep 2023 06:53:23 -0400 Subject: [PATCH] fix: check for only undefined or null on the size --- src/cid.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cid.ts b/src/cid.ts index 6da2a79..e6b3a4e 100644 --- a/src/cid.ts +++ b/src/cid.ts @@ -35,7 +35,7 @@ export function encodeCid( throw new Error(); } - if (!size) { + if (size === undefined || size === null) { throw new Error("size required"); }