Fix empty result not containing query
This commit is contained in:
parent
4971491dfe
commit
c1a136c6db
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue