From 5db121774ebf7c4eec4360a299cfb54991091747 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 23 Jun 2023 19:16:18 -0400 Subject: [PATCH] fix: need to use length, not size --- src/download.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/download.ts b/src/download.ts index d1b909b..cdf5e6a 100644 --- a/src/download.ts +++ b/src/download.ts @@ -7,7 +7,7 @@ const NO_PORTALS_ERROR = [null, "no active portals"] as ErrTuple; export async function downloadObject(cid: string): Promise { const activePortals = getActivePortals(); - if (!activePortals.size) { + if (!activePortals.length) { return NO_PORTALS_ERROR; }