Skip to content

Commit

Permalink
navigation.push bugfix for remix-run/history#808 added
Browse files Browse the repository at this point in the history
  • Loading branch information
Malte Legenhausen committed Jul 1, 2020
1 parent 2ed48a4 commit c26c226
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "effe-ts",
"version": "0.4.0",
"version": "0.4.1",
"main": "lib/index.js",
"license": "MIT",
"author": "Malte Legenhausen <[email protected]>",
Expand Down
5 changes: 4 additions & 1 deletion src/Navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ export interface NavigationHistory {
export function history(history: History): NavigationHistory {
return {
location: history.location,
push: url => () => history.push(url),
push: url => () => {
const [pathname, search] = url.split('?')
history.push({ pathname, search })
},
back: () => history.back(),
listen: f => () => history.listen(f)
}
Expand Down

0 comments on commit c26c226

Please sign in to comment.