Skip to content

Commit

Permalink
fix: Dashboard report creation error handling (apache#19859)
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Ritter authored and philipher29 committed Jun 9, 2022
1 parent 0520880 commit ecde1ee
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 ecde1ee

Please sign in to comment.