From 60aa57673187e9c362442bbf6a04fe4f9e6aaeed Mon Sep 17 00:00:00 2001 From: Zak Patterson Date: Sun, 14 Jul 2019 23:04:25 -0500 Subject: [PATCH] Use correct string method for pushing url state (#8) --- outwatch-router/src/main/scala/outwatch/router/Router.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/outwatch-router/src/main/scala/outwatch/router/Router.scala b/outwatch-router/src/main/scala/outwatch/router/Router.scala index 5f36c40..bbe077e 100644 --- a/outwatch-router/src/main/scala/outwatch/router/Router.scala +++ b/outwatch-router/src/main/scala/outwatch/router/Router.scala @@ -24,7 +24,7 @@ class AppRouter[P](siteRoot: Path, parent: Path, f: Path => P) { // Sync from the required page to the window.location def routerReducer(state: RouterState[P], action: Action): RouterState[P] = action match { case Replace(path) => - window.history.pushState("", "", Path(siteRoot, Path(parent, path)).toString) + window.history.pushState("", "", Path(siteRoot, Path(parent, path)).toUrlString) state.copy(page = f(path)) case _ => state }