Skip to content

Commit c26c226

Browse files
author
Malte Legenhausen
committed
navigation.push bugfix for remix-run/history#808 added
1 parent 2ed48a4 commit c26c226

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "effe-ts",
3-
"version": "0.4.0",
3+
"version": "0.4.1",
44
"main": "lib/index.js",
55
"license": "MIT",
66
"author": "Malte Legenhausen <[email protected]>",

src/Navigation.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ export interface NavigationHistory {
2828
export function history(history: History): NavigationHistory {
2929
return {
3030
location: history.location,
31-
push: url => () => history.push(url),
31+
push: url => () => {
32+
const [pathname, search] = url.split('?')
33+
history.push({ pathname, search })
34+
},
3235
back: () => history.back(),
3336
listen: f => () => history.listen(f)
3437
}

0 commit comments

Comments
 (0)