mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-24 02:27:37 +00:00
Fix back button going to the home/search page
This commit is contained in:
parent
e51a59f7aa
commit
b5091c855e
2 changed files with 5 additions and 6 deletions
|
|
@ -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 || ""));
|
||||
})
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue