diff --git a/frontend/src/app/pages/DashBoardPage/actions/widgetAction.ts b/frontend/src/app/pages/DashBoardPage/actions/widgetAction.ts index 4915b631b..dbd6094f5 100644 --- a/frontend/src/app/pages/DashBoardPage/actions/widgetAction.ts +++ b/frontend/src/app/pages/DashBoardPage/actions/widgetAction.ts @@ -514,7 +514,7 @@ export const setWidgetSampleDataAction = const viewBoardState = rootState.board as BoardState; const editBoardState = rootState.editBoard as EditBoardState; const dataChartMap = viewBoardState.dataChartMap; - const curChart = dataChartMap[boardId][datachartId]; + const curChart = dataChartMap[boardId]?.[datachartId]; if (!curChart) return; if (curChart.viewId) return; if (!curChart.config.sampleData) return;