add claim search query to claimSearchByQuery when the result times out #296

Merged
neb-b merged 1 commit from claim-search into master 2020-03-31 18:00:47 +02:00
2 changed files with 13 additions and 3 deletions

9
dist/bundle.es.js vendored
View file

@ -4951,11 +4951,16 @@ reducers[CLAIM_SEARCH_COMPLETED] = (state, action) => {
};
reducers[CLAIM_SEARCH_FAILED] = (state, action) => {
const { query } = action.data;
const claimSearchByQuery = Object.assign({}, state.claimSearchByQuery);
const fetchingClaimSearchByQuery = Object.assign({}, state.fetchingClaimSearchByQuery);
delete fetchingClaimSearchByQuery[action.data.query];
delete fetchingClaimSearchByQuery[query];
claimSearchByQuery[query] = null;
return Object.assign({}, state, {
fetchingClaimSearchByQuery
fetchingClaimSearchByQuery,
claimSearchByQuery
});
};

View file

@ -457,11 +457,16 @@ reducers[ACTIONS.CLAIM_SEARCH_COMPLETED] = (state: State, action: any): State =>
};
reducers[ACTIONS.CLAIM_SEARCH_FAILED] = (state: State, action: any): State => {
const { query } = action.data;
const claimSearchByQuery = Object.assign({}, state.claimSearchByQuery);
const fetchingClaimSearchByQuery = Object.assign({}, state.fetchingClaimSearchByQuery);
delete fetchingClaimSearchByQuery[action.data.query];
delete fetchingClaimSearchByQuery[query];
claimSearchByQuery[query] = null;
return Object.assign({}, state, {
fetchingClaimSearchByQuery,
claimSearchByQuery,
});
};