Skip to content

Commit

Permalink
Prevent error on empty search enter
Browse files Browse the repository at this point in the history
  • Loading branch information
joepio committed Nov 15, 2021
1 parent c46f8b8 commit a1fe766
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data-browser/src/routes/SearchRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function Search(): JSX.Element {
e => {
e.preventDefault();
const subject =
htmlElRef.current.children[selectedIndex].getAttribute('about');
htmlElRef?.current?.children[selectedIndex]?.getAttribute('about');
if (subject) {
//@ts-ignore blur does exist though
document?.activeElement?.blur();
Expand Down

0 comments on commit a1fe766

Please sign in to comment.