From aa93ac9914fd98202514a17d79713510fbfe2b64 Mon Sep 17 00:00:00 2001 From: Jori Lallo Date: Thu, 11 May 2017 23:26:57 -0700 Subject: [PATCH] Fixed search after flow fixes --- frontend/scenes/Search/SearchStore.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/scenes/Search/SearchStore.js b/frontend/scenes/Search/SearchStore.js index f3e807f61..99eeed53f 100644 --- a/frontend/scenes/Search/SearchStore.js +++ b/frontend/scenes/Search/SearchStore.js @@ -6,7 +6,6 @@ import type { Pagination, Document } from 'types'; class SearchStore { @observable documents: ?(Document[]); - @observable pagination: Pagination; @observable searchTerm: ?string = null; @observable isFetching = false; @@ -20,11 +19,10 @@ class SearchStore { if (query) { try { const res = await client.get('/documents.search', { query }); - invariant(res && res.data && res.pagination, 'API response'); - const { data, pagination } = res; + invariant(res && res.data, 'res or res.data missing'); + const { data } = res; runInAction('search document', () => { this.documents = data; - this.pagination = pagination; }); } catch (e) { console.error('Something went wrong');