소스 검색

Skip list request if ID is empty

Zed 4 년 전
부모
커밋
e3f6c72bf6
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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