Don't parse empty strings
This commit is contained in:
parent
45247dfa3f
commit
62062e5dfb
@ -13,7 +13,11 @@ parseUrl url =
|
|||||||
|> Maybe.andThen splitOffHead
|
|> Maybe.andThen splitOffHead
|
||||||
|> Maybe.andThen
|
|> Maybe.andThen
|
||||||
(\( ( ( ( ( prov, user ), repo ), separator ), gitref ), file ) ->
|
(\( ( ( ( ( prov, user ), repo ), separator ), gitref ), file ) ->
|
||||||
if List.isEmpty file || (separator /= pathSeparator prov) then
|
if
|
||||||
|
List.isEmpty file
|
||||||
|
|| (List.head file |> Maybe.map String.isEmpty |> Maybe.withDefault False)
|
||||||
|
|| (separator /= pathSeparator prov)
|
||||||
|
then
|
||||||
Nothing
|
Nothing
|
||||||
|
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user