Skip to content

Commit

Permalink
fix(react-docs): fix router after update of history
Browse files Browse the repository at this point in the history
  • Loading branch information
tlaundal committed Jun 15, 2020
1 parent b444133 commit e09281b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions react-docs/src/router/router$.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type HistoryShape = {
const history$ = new Subject<HistoryShape>();

history.listen((location) => {
history$.next(location);
history$.next({ search: location.location.search});
});

type RouterShape = {
Expand All @@ -30,6 +30,6 @@ export const selectPage = (pageId: string) => {
urlParams.set('p', pageId);
history.push({
pathname: history.location.pathname,
search: urlParams.toString(),
search: '?' + urlParams.toString(),
});
};

0 comments on commit e09281b

Please sign in to comment.