From b2808a1ab99d8b717688cb2ed8c96603cee508ca Mon Sep 17 00:00:00 2001 From: sqwishy Date: Fri, 15 Jul 2022 10:11:56 -0700 Subject: [PATCH] wrap array results from deno scripts in object (#204) --- backend/src/worker.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/worker.rs b/backend/src/worker.rs index 85b1511c7e..1015e3e3fa 100644 --- a/backend/src/worker.rs +++ b/backend/src/worker.rs @@ -614,7 +614,7 @@ async function run() {{ if (res == undefined) {{ res = {{}} }} - if (typeof res !== 'object') {{ + if (typeof res !== 'object' || Array.isArray(res)) {{ res = {{ res1: res }} }}