fix: inconsistent input use on handleGetNetworksByType

This commit is contained in:
Derrick Hammer 2023-07-19 13:17:52 -04:00
parent 32638417df
commit c5dd605571
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -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]),
);