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;