Fix docsearch

This commit is contained in:
Ines Montani 2019-03-19 14:38:49 +01:00
parent 0155083e01
commit c6ee030721
1 changed files with 1 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import classes from '../styles/search.module.sass'
const Search = ({ id, placeholder, settings }) => { const Search = ({ id, placeholder, settings }) => {
const { apiKey, indexName } = settings const { apiKey, indexName } = settings
if (!apiKey && !indexName) return null
const [initialized, setInitialized] = useState(false) const [initialized, setInitialized] = useState(false)
useEffect(() => { useEffect(() => {
if (!initialized) { if (!initialized) {