1
0
Fork 0
mirror of synced 2024-09-28 07:11:40 +12:00

Merge branch 'BUDI-8113/fix-isolated-vm-bundler' of github.com:Budibase/budibase into BUDI-8113/fix-isolated-vm-bundler

This commit is contained in:
Andrew Kingston 2024-03-21 16:59:40 +00:00
commit 67a1f82ed2
3 changed files with 22 additions and 2 deletions

View file

@ -1,5 +1,5 @@
{
"version": "2.22.9",
"version": "2.22.10",
"npmClient": "yarn",
"packages": [
"packages/*",

View file

@ -94,7 +94,7 @@ export async function processObject<T extends Record<string, any>>(
for (const key of Object.keys(object || {})) {
if (object[key] != null) {
const val = object[key]
let parsedValue
let parsedValue = val
if (typeof val === "string") {
parsedValue = await processString(object[key], context, opts)
} else if (typeof val === "object") {

View file

@ -104,6 +104,26 @@ describe("Test that the object processing works correctly", () => {
}
expect(error).toBeNull()
})
it("should be able to handle booleans", async () => {
const output = await processObject(
{
first: true,
second: "true",
third: "another string",
forth: "with {{ template }}",
},
{
template: "value",
}
)
expect(output).toEqual({
first: true,
second: "true",
third: "another string",
forth: "with value",
})
})
})
describe("check returning objects", () => {