fix clone object error

This commit is contained in:
Han Tuerker
2023-02-15 17:32:00 +03:00
parent 0febee0072
commit 00a76bbd7b
2 changed files with 2 additions and 2 deletions

View File

@@ -60,7 +60,7 @@ export const useFormula = ({
worker.postMessage({
formulaFn,
row: availableFields,
row: JSON.stringify(availableFields),
});
return () => {

View File

@@ -8,7 +8,7 @@ onmessage = async ({ data }) => {
"row",
`const fn = async () => \n${fnBody}\n return fn();`
);
const result = await fn(row);
const result = await fn(JSON.parse(row));
postMessage({ result });
} catch (error: any) {
console.error("Error: ", error);