aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/lib')
-rw-r--r--src/client/react/lib/url.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/react/lib/url.js b/src/client/react/lib/url.js
index 752fec2..442e5eb 100644
--- a/src/client/react/lib/url.js
+++ b/src/client/react/lib/url.js
@@ -74,7 +74,11 @@ export function makeSetWeek(history) {
export function makeUpdatePathname(history) {
return function updatePathname(pathname) {
const query = history.location.search;
- history.push(`/${pathname}${query}`);
+ if (pathname) {
+ history.push(`/${pathname}${query}`);
+ } else {
+ history.push(`/${query}`);
+ }
};
}