diff --git a/packages/server/src/jsRunner/tests/jsRunner.spec.ts b/packages/server/src/jsRunner/tests/jsRunner.spec.ts index dc6e32f52c..54983aa470 100644 --- a/packages/server/src/jsRunner/tests/jsRunner.spec.ts +++ b/packages/server/src/jsRunner/tests/jsRunner.spec.ts @@ -1,7 +1,7 @@ import { validate as isValidUUID } from "uuid" import { processStringSync, encodeJSBinding } from "@budibase/string-templates" -import { runJsHelpersTests } from "@budibase/string-templates/test/utils" +const { runJsHelpersTests } = require("@budibase/string-templates/test/utils") import tk from "timekeeper" import { init } from ".." diff --git a/packages/string-templates/src/index.ts b/packages/string-templates/src/index.ts index 978f8c0556..dd16a0f0ac 100644 --- a/packages/string-templates/src/index.ts +++ b/packages/string-templates/src/index.ts @@ -98,7 +98,7 @@ export async function processObject>( } else if (typeof val === "object") { parsedValue = await processObject(object[key], context, opts) } - ;(object as any)[key] = parsedValue + object = { ...object, [key]: parsedValue } } } return object