Skip to content

Commit

Permalink
fix: Dashboard report creation error handling (#19859)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Ritter authored Apr 27, 2022
1 parent 768e4b7 commit ad878b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset-frontend/src/components/ReportModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ type ReportActionType =
}
| {
type: ActionType.error;
payload: { name: string[] };
payload: { name?: string[] };
};

const TEXT_BASED_VISUALIZATION_TYPES = [
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit ad878b0

Please sign in to comment.