pull/2092/head
filip mertens 3 years ago
parent fe8f8114c8
commit a510ba9ab2
  1. 4
      libs/remix-ui/search/src/lib/reducers/Reducer.ts

@ -36,6 +36,7 @@ export const SearchReducer = (state: SearchState = SearchingInitialState, action
count: 0 count: 0
} }
case 'UPDATE_COUNT': case 'UPDATE_COUNT':
if (state.searchResults) {
const findFile = state.searchResults.find(file => file.filename === action.payload.file) const findFile = state.searchResults.find(file => file.filename === action.payload.file)
let count = 0 let count = 0
if (findFile) { if (findFile) {
@ -50,6 +51,9 @@ export const SearchReducer = (state: SearchState = SearchingInitialState, action
...state, ...state,
count: count count: count
} }
} else {
return state
}
case 'TOGGLE_CASE_SENSITIVE': case 'TOGGLE_CASE_SENSITIVE':
return { return {
...state, ...state,

Loading…
Cancel
Save