From fe08dd3915be34736ed36bb0453a91f11c1a97f4 Mon Sep 17 00:00:00 2001 From: Zak Patterson Date: Mon, 11 Feb 2019 17:20:06 -0500 Subject: [PATCH] Fix router url handling for child routers --- outwatch-router/src/main/scala/outwatch/router/Router.scala | 2 +- project/Version.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/outwatch-router/src/main/scala/outwatch/router/Router.scala b/outwatch-router/src/main/scala/outwatch/router/Router.scala index f342e17..7edea59 100644 --- a/outwatch-router/src/main/scala/outwatch/router/Router.scala +++ b/outwatch-router/src/main/scala/outwatch/router/Router.scala @@ -15,7 +15,7 @@ final case class RouterState[P](page: P) class AppRouter[F[_]: LiftIO, P](root: Path, f: Path => P) { def routerReducer(state: RouterState[P], action: Action): RouterState[P] = action match { case Replace(path) => - Path.unapplySeq(Path(root, path)).foreach(p => window.history.replaceState("", "", p.mkString("/"))) + window.history.replaceState("", "", Path(root, path).toString) state.copy(page = f(path)) case _ => state } diff --git a/project/Version.scala b/project/Version.scala index c35a2f0..def7504 100644 --- a/project/Version.scala +++ b/project/Version.scala @@ -1,4 +1,4 @@ object Version{ - val version = "0.0.3" + val version = "0.0.4" val scalaVersion = "2.12.8" }