From aa7d82eb376942e0525bf4ded4e80eabfca443c2 Mon Sep 17 00:00:00 2001 From: Romuald Brillout Date: Thu, 2 Feb 2023 23:09:07 +0100 Subject: [PATCH] fix: ensure telefunctionReturn is initialized (fix #58) --- telefunc/node/server/runTelefunc/executeTelefunction.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telefunc/node/server/runTelefunc/executeTelefunction.ts b/telefunc/node/server/runTelefunc/executeTelefunction.ts index 3725dc0d..e31789aa 100644 --- a/telefunc/node/server/runTelefunc/executeTelefunction.ts +++ b/telefunc/node/server/runTelefunc/executeTelefunction.ts @@ -16,6 +16,7 @@ async function executeTelefunction(runContext: { restoreContext(runContext.providedContext) + let telefunctionReturn: unknown let telefunctionError: unknown let telefunctionHasErrored = false let telefunctionAborted = false @@ -44,7 +45,6 @@ async function executeTelefunction(runContext: { onError(err) } - let telefunctionReturn: unknown if (!telefunctionHasErrored && !telefunctionAborted) { assertUsage( isPromise(resultSync),