From c5dd60557129586fc0c0afb1a0f2c93e28deebcf Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 19 Jul 2023 13:17:52 -0400 Subject: [PATCH] fix: inconsistent input use on handleGetNetworksByType --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 7ef84cd..1196bcd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -63,7 +63,7 @@ function handleGetNetworksByType(aq: ActiveQuery) { return; } - if (!types.has(aq.callerInput)) { + if (!types.has(aq.callerInput.type)) { aq.reject("type not registered"); return; } @@ -71,7 +71,7 @@ function handleGetNetworksByType(aq: ActiveQuery) { aq.respond( [...networks.entries()] .filter((item) => { - return item[1].has(aq.callerInput); + return item[1].has(aq.callerInput.type); }) .map((item) => item[0]), );