Skip to content

Commit

Permalink
R Austin review: change payload for failed action
Browse files Browse the repository at this point in the history
  • Loading branch information
Brent Kimmel committed May 18, 2020
1 parent e742cce commit fe978f6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface ServerReturnedRelatedEventData {
*/
interface ServerFailedToReturnRelatedEventData {
readonly type: 'serverFailedToReturnRelatedEventData';
readonly payload: [ResolverEvent];
readonly payload: ResolverEvent;
}

export type DataAction =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const dataReducer: Reducer<DataState, ResolverAction> = (state = initialS
const statsMap = state.resultsEnrichedWithRelatedEventInfo;
if (statsMap) {
const currentStatsMap = new Map(statsMap);
const [resolverEvent] = action.payload;
const resolverEvent = action.payload;
currentStatsMap.set(resolverEvent, new Error('error requesting related events'));
return { ...state, resultsEnrichedWithRelatedEventInfo: currentStatsMap };
}
Expand Down

0 comments on commit fe978f6

Please sign in to comment.