ctucx.git: nimhafas

hafas-client library

commit 7b51b8ef3145ff6adcd533a42265585aa3506c41
parent 677ab204bcea0441aeb1e5481863f3f124ec1d9f
Author: Leah (ctucx) <leah@ctu.cx>
Date: Mon, 21 Jun 2021 12:14:10 +0200

temporary fix
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/nimhafas/parse/point.nim b/nimhafas/parse/point.nim
@@ -29,6 +29,8 @@ proc parsePoint*(loc: JsonNode): Point =
       latitude: loc{"crd"}{"y"}.getInt() / 1000000,
       longitude: loc{"crd"}{"x"}.getInt() / 1000000,
     ))
+  elif typeStr == "":
+    return
   else:
     raise newException(CatchableError, "Unimplemented hafas loc type: " & typeStr)