From c1a136c6dbc58df215a2267c21833f99e857e196 Mon Sep 17 00:00:00 2001 From: Zed Date: Wed, 18 Sep 2019 20:54:14 +0200 Subject: [PATCH] Fix empty result not containing query --- src/api/search.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/search.nim b/src/api/search.nim index 6c8ce89..67f0477 100644 --- a/src/api/search.nim +++ b/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