Fix empty result not containing query

This commit is contained in:
Zed 2019-09-18 20:54:14 +02:00
parent 4971491dfe
commit c1a136c6db
1 changed files with 1 additions and 1 deletions

View File

@ -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