diff --git a/src/redux/epics.js b/src/redux/epics.js index 8b539acf..694b90f0 100644 --- a/src/redux/epics.js +++ b/src/redux/epics.js @@ -1,5 +1,5 @@ import { combineEpics } from "redux-observable"; -import { of, from, empty } from "rxjs"; +import { of, from } from "rxjs"; import * as Actions from "./actionCreators"; import * as Selectors from "./selectors"; import { filter, switchMap, map } from "rxjs/operators"; @@ -16,10 +16,7 @@ const urlChangedEpic = actions => const segments = action.location.pathname.split("/"); return of(Actions.selectedSkin(segments[2])); } - if (query == null) { - return empty(); - } - return of(Actions.searchQueryChanged(query)); + return of(Actions.searchQueryChanged(query || "")); }) ); diff --git a/src/redux/store.js b/src/redux/store.js index 8837e159..00a54bcb 100644 --- a/src/redux/store.js +++ b/src/redux/store.js @@ -27,7 +27,9 @@ function reducer(state = defaultState, action) { case "SEARCH_QUERY_CHANGED": return { ...state, - searchQuery: action.query + searchQuery: action.query, + selectedSkinHash: null, + selectedSkinPosition: null }; case "GOT_NEW_MATCHING_HASHES": return {