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