Browse Source

Skip list request if ID is empty

Zed 4 năm trước cách đây
mục cha
commit
e3f6c72bf6
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      src/api.nim

+ 1 - 0
src/api.nim

@@ -22,6 +22,7 @@ proc getGraphListById*(id: string): Future[List] {.async.} =
   result = parseGraphList(js)
 
 proc getListTimeline*(id: string; after=""): Future[Timeline] {.async.} =
+  if id.len == 0: return
   let
     ps = genParams({"list_id": id, "ranking_mode": "reverse_chronological"}, after)
     url = listTimeline ? ps