Updated expenses action in redux to not call more than once

• Updated:
- expenses action in redux to not call more than once
This commit is contained in:
mgabdev 2021-01-15 15:21:31 -05:00
parent 33d8f571cd
commit f7b061845e
1 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,9 @@ export const EXPENSES_FETCH_FAIL = 'EXPENSES_FETCH_FAIL'
*/
export const fetchExpenses = () => (dispatch, getState) => {
if (!me) return
const isFetched = getState().getIn(['expenses', 'fetched'], false)
if (isFetched) return
dispatch(fetchExpensesRequest())