From 7cdb1dbd652cfcabdac5ed0b824548b374ab6889 Mon Sep 17 00:00:00 2001 From: "J.C. Zhong" Date: Wed, 18 Jan 2023 21:01:44 -0800 Subject: [PATCH] fix: json-bigint hasOwnProperty undefined issue (#1129) * fix: json-bigint hasOwnProperty undefined issue * use cloneDeep --- querybook/webapp/lib/query-result/transformer.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/querybook/webapp/lib/query-result/transformer.tsx b/querybook/webapp/lib/query-result/transformer.tsx index 047c47afe..e9a4ec128 100644 --- a/querybook/webapp/lib/query-result/transformer.tsx +++ b/querybook/webapp/lib/query-result/transformer.tsx @@ -1,4 +1,5 @@ import JSONBig from 'json-bigint'; +import { cloneDeep } from 'lodash'; import React from 'react'; import ReactJson, { ThemeObject } from 'react-json-view'; @@ -107,7 +108,7 @@ const queryResultTransformers: IColumnTransformer[] = [ // This is a workaround for https://github.com/sidorares/json-bigint/issues/38 // to make sure it is of `Object` prototype when passed over to - const jsonSrc = { ...json }; + const jsonSrc = cloneDeep(json); return (