Skip to content

Commit

Permalink
Doesn’t show no results while results are still loading
Browse files Browse the repository at this point in the history
  • Loading branch information
cbothner committed Nov 1, 2017
1 parent 95ce285 commit f24ed59
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/javascript/catalog/Results.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import SearchForm from 'catalog/SearchForm'
import { Main, CatalogSection, SectionTitle } from 'catalog/shared'
import { Container as Sidebar } from 'catalog/Sidebar'

import type { IntlShape } from 'react-intl'
import type { ContextRouter } from 'react-router-dom'
import type { State } from 'catalog'

Expand Down Expand Up @@ -66,8 +65,9 @@ class Results extends React.Component<
<Main key="main">
<CatalogSection>
<SectionTitle>Search Results</SectionTitle>
{loading.cases ? null : this.state.results.length === 0 ? (
<NoSearchResults />
{loading.cases || this.state.loading ? null : this.state.results
.length === 0 ? (
<NoSearchResults />
) : (
<CaseList
cases={this.state.results.map(slug => cases[slug])}
Expand Down

0 comments on commit f24ed59

Please sign in to comment.