diff --git a/src/components/SearchDialog/index.tsx b/src/components/SearchDialog/index.tsx
index c1faba1..d3dbf5f 100644
--- a/src/components/SearchDialog/index.tsx
+++ b/src/components/SearchDialog/index.tsx
@@ -17,12 +17,15 @@ export function SearchDialog({ open, setOpen }: { open: boolean; setOpen: Dispat
const [debouncedInput, setDebouncedInput] = useState(input)
const { profiles } = useSearchProfiles(debouncedInput, 10)
const normalizedUrl = useMemo(() => {
+ if (['w', 'ws', 'ws:', 'ws:/', 'wss', 'wss:', 'wss:/'].includes(input)) {
+ return undefined
+ }
try {
- return normalizeUrl(debouncedInput)
+ return normalizeUrl(input)
} catch {
return undefined
}
- }, [debouncedInput])
+ }, [input])
const list = useMemo(() => {
const search = input.trim()
@@ -55,9 +58,9 @@ export function SearchDialog({ open, setOpen }: { open: boolean; setOpen: Dispat
return (
<>
- {!!normalizedUrl &&
setOpen(false)} />}
setOpen(false)} />
setOpen(false)} />
+ {!!normalizedUrl && setOpen(false)} />}
{profiles.map((profile) => (
setOpen(false)} />
))}