From dc50c7a068b03b6c48a72884693e1989e9ba9dec Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 22 Jul 2023 20:48:43 -0400 Subject: [PATCH] fix: array handling --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 1196bcd..c52612b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -33,9 +33,9 @@ function handleRegisterNetwork(aq: ActiveQuery) { let network = networks.get(aq.domain); if (network) { - aq.callerInput.type.forEach((item) => network?.add(item)); + [...aq.callerInput.type].forEach((item) => network?.add(item)); } else { - networks.set(aq.domain, new Set([aq.callerInput.types])); + networks.set(aq.domain, new Set([...aq.callerInput.types])); } aq.respond();