From 324abfc34f7702b0072f21ca6b3ad8df4034f1b3 Mon Sep 17 00:00:00 2001 From: Sergey Zenin Date: Thu, 12 Sep 2019 11:55:25 +0300 Subject: [PATCH] =?UTF-8?q?fix(algolia-search):=20=F0=9F=90=9B=20add=20che?= =?UTF-8?q?cking=20for=20a=20`hit`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/algolia-search/helpers.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/algolia-search/helpers.jsx b/src/components/algolia-search/helpers.jsx index c750c6a2f..0e86c0d40 100644 --- a/src/components/algolia-search/helpers.jsx +++ b/src/components/algolia-search/helpers.jsx @@ -1,7 +1,7 @@ import * as React from 'react' export let hasMatch = field => hit => { - let match = hit => hit.matchLevel !== 'none' + let match = hit => hit && hit.matchLevel !== 'none' let fieldHit = hit._highlightResult[field] return Array.isArray(fieldHit) ? fieldHit.some(match) : match(fieldHit)