From 238c790f9b0e2f84ea644123d308a18125d2b2c9 Mon Sep 17 00:00:00 2001 From: Shishir Karanth Date: Mon, 16 Sep 2024 16:40:29 +0530 Subject: [PATCH] fix: handle functions while marshalling (#3102) * fix: handle functions while marshalling * fix: js style --- packages/bruno-js/src/sandbox/quickjs/utils/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/bruno-js/src/sandbox/quickjs/utils/index.js b/packages/bruno-js/src/sandbox/quickjs/utils/index.js index e376c3252..47be92f5f 100644 --- a/packages/bruno-js/src/sandbox/quickjs/utils/index.js +++ b/packages/bruno-js/src/sandbox/quickjs/utils/index.js @@ -25,6 +25,8 @@ const marshallToVm = (value, vm) => { } return obj; } + } else if (typeof value === 'function') { + return vm.newString('[Function (anonymous)]'); } };