Fix stray null error in SearchToolbar
Oops, we don't provide this in the item search page, so check for that!
This commit is contained in:
parent
107696783e
commit
fe5eab5763
1 changed files with 2 additions and 2 deletions
|
@ -47,7 +47,7 @@ export function searchQueryIsEmpty(query) {
|
|||
function SearchToolbar({
|
||||
query,
|
||||
searchQueryRef,
|
||||
firstSearchResultRef,
|
||||
firstSearchResultRef = null,
|
||||
onChange,
|
||||
autoFocus,
|
||||
showItemsLabel = false,
|
||||
|
@ -77,7 +77,7 @@ function SearchToolbar({
|
|||
zoneLabels.sort();
|
||||
|
||||
const onMoveFocusDownToResults = (e) => {
|
||||
if (firstSearchResultRef.current) {
|
||||
if (firstSearchResultRef && firstSearchResultRef.current) {
|
||||
firstSearchResultRef.current.focus();
|
||||
e.preventDefault();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue