From cd7f89b61732dec003785181de2f0b6bbeadaf9c Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 20 Sep 2022 06:16:45 -0400 Subject: [PATCH] *Change to ternary and return null if there is a stream --- src/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 38cb8cf..3d002c3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -194,9 +194,7 @@ async function fetchFromRelays( throw new Error(resp.error); } - if (!stream) { - return resp.data; - } + return !!stream ? null : resp.data; } throw error;