diff --git a/plugins/linear-genome-view/src/LinearGenomeView/components/RefNameAutocomplete.tsx b/plugins/linear-genome-view/src/LinearGenomeView/components/RefNameAutocomplete.tsx index f5c228f2b0..b9d316be30 100644 --- a/plugins/linear-genome-view/src/LinearGenomeView/components/RefNameAutocomplete.tsx +++ b/plugins/linear-genome-view/src/LinearGenomeView/components/RefNameAutocomplete.tsx @@ -94,10 +94,10 @@ function RefNameAutocomplete({ const [searchOptions, setSearchOptions] = useState([]) const { assemblyManager } = session const { coarseVisibleLocStrings } = model - const assembly = assemblyName && assemblyManager.get(assemblyName) - const regions: Region[] = useMemo(() => { - return (assembly && assembly.regions) || [] - }, [assembly]) + const assembly = assemblyName ? assemblyManager.get(assemblyName) : undefined + + // eslint-disable-next-line react-hooks/exhaustive-deps + const regions: Region[] = assembly?.regions || [] // default options for dropdown const limitOption: Array