diff --git a/superset-frontend/src/components/ReportModal/index.tsx b/superset-frontend/src/components/ReportModal/index.tsx index 7707a22896d2b..c45d8fad47625 100644 --- a/superset-frontend/src/components/ReportModal/index.tsx +++ b/superset-frontend/src/components/ReportModal/index.tsx @@ -129,7 +129,7 @@ type ReportActionType = } | { type: ActionType.error; - payload: { name: string[] }; + payload: { name?: string[] }; }; const TEXT_BASED_VISUALIZATION_TYPES = [ @@ -175,7 +175,7 @@ const reportReducer = ( case ActionType.error: return { ...state, - error: action.payload?.name[0] || defaultErrorMsg, + error: action.payload?.name?.[0] || defaultErrorMsg, }; default: return state;