diff --git a/website/src/components/SearchPage/fields/MutationField.tsx b/website/src/components/SearchPage/fields/MutationField.tsx index 46f6b17a7..60e142d4e 100644 --- a/website/src/components/SearchPage/fields/MutationField.tsx +++ b/website/src/components/SearchPage/fields/MutationField.tsx @@ -168,10 +168,14 @@ export const MutationField: FC = ({ referenceGenomesSequence setOptions(newOptions); }; - const handleOptionClick = (option: MutationQuery[] | MutationQuery) => { + const handleOptionClick = (option: MutationQuery[] | MutationQuery | null) => { if (Array.isArray(option)) { option = option[0]; } + // Unclear how to handle null here, necessary since headlessui v2 + if (!option) { + return; + } const newSelectedOptions = [...selectedOptions, option]; onChange(serializeMutationQueries(newSelectedOptions)); setInputValue('');