fix: Dashboard report creation error handling (#19859)

This commit is contained in:
Erik Ritter 2022-04-26 21:52:58 -07:00 committed by GitHub
parent 768e4b7a54
commit ad878b07e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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;