Explorar o código

Fix empty result not containing query

Zed %!s(int64=7) %!d(string=hai) anos
pai
achega
c1a136c6db
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/api/search.nim

+ 1 - 1
src/api/search.nim

@@ -42,7 +42,7 @@ proc getSearch*[T](query: Query; after, agent: string): Future[Result[T]] {.asyn
     }
 
   let json = await fetchJson(base / searchUrl ? params, headers)
-  if json == nil: return Result[T]()
+  if json == nil: return Result[T](query: some query)
 
   result = getResult[T](json, query, after)
   if not json.hasKey("items_html"): return