From 1348f53222291a2ba1356603ccaef6001a6e1c0a Mon Sep 17 00:00:00 2001 From: junjun Date: Mon, 21 Feb 2022 17:24:42 +0800 Subject: [PATCH] feat: S2 pivot --- frontend/src/views/chart/chart/table/table-info.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/chart/chart/table/table-info.js b/frontend/src/views/chart/chart/table/table-info.js index d5a6f96938..dd6b000952 100644 --- a/frontend/src/views/chart/chart/table/table-info.js +++ b/frontend/src/views/chart/chart/table/table-info.js @@ -116,7 +116,12 @@ export function baseTableNormal(s2, container, chart, action, tableData) { // add drill list if (chart.drill) { - const drillFields = JSON.parse(chart.drillFields) + let drillFields = [] + try { + drillFields = JSON.parse(chart.drillFields) + } catch (err) { + drillFields = JSON.parse(JSON.stringify(chart.drillFields)) + } const drillField = drillFields[chart.drillFilters.length] const drillFilters = JSON.parse(JSON.stringify(chart.drillFilters))