Fix case for index route codegen.

This commit is contained in:
Dillon Kearns 2022-09-13 08:55:41 -07:00
parent b4aceaeb64
commit c93e3d8f85
2 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ routeToBranch route =
)
in
case route.segments of
[] ->
[ StaticSegment "Index" ] ->
[ ( Elm.CodeGen.listPattern [], Elm.CodeGen.val "Index" ) ]
segments ->

View File

@ -138,7 +138,7 @@ suite =
, describe "toCase"
[ test "root route" <|
\() ->
[]
[ "Index" ]
|> testCaseGenerator
[ ( Elm.CodeGen.listPattern []
, Elm.CodeGen.val "Index"