File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -155,10 +155,14 @@ runRouteParser = go
155155
156156parsePath :: String -> RouteState
157157parsePath =
158- splitAt (flip Tuple " " ) " ? "
159- >>> bimap splitSegments (splitAt (flip Tuple " " ) " # " >>> lmap splitParams)
158+ splitAt (flip Tuple " " ) " # "
159+ >>> lmap splitPath
160160 >>> toRouteState
161161 where
162+ splitPath =
163+ splitAt (flip Tuple " " ) " ?"
164+ >>> bimap splitSegments splitParams
165+
162166 splitSegments = splitNonEmpty (Pattern " /" ) >>> case _ of
163167 [" " , " " ] -> [" " ]
164168 xs -> map unsafeDecodeURIComponent xs
@@ -172,7 +176,7 @@ parsePath =
172176 splitNonEmpty _ " " = []
173177 splitNonEmpty p s = split p s
174178
175- toRouteState (Tuple segments (Tuple params h) ) =
179+ toRouteState (Tuple (Tuple segments params) h ) =
176180 { segments, params, hash: h }
177181
178182 splitAt k p str =
You can’t perform that action at this time.
0 commit comments