aboutsummaryrefslogtreecommitdiff
path: root/src/util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.ts')
-rw-r--r--src/util.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/util.ts b/src/util.ts
index a486294..b7d4efe 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -7,9 +7,10 @@ export const match = <K extends string, R>(
) => (k && pattern[k] ? pattern[k]() : pattern._())
export const evalList = async (ctx: Ctx, effectTyps: Type[]) => {
- const effectResults: string[] = []
+ const effectResults: (string | undefined)[] = []
for (const item of effectTyps ?? []) {
- effectResults.push(...(await ctx.evaluateType(ctx, item)))
+ const [resultKey] = await ctx.evaluateType(ctx, item)
+ effectResults.push(resultKey ? resultKey : undefined)
}
return effectResults
}
@@ -69,8 +70,6 @@ export const applyFunc = (
return undefined
})()
- // TODO: Cleanup unwanted result node values
-
if (!resultType) {
throw new Error('Couldnt get result for function application')
}