diff --git a/src/views/not-found/not-found.tsx b/src/views/not-found/not-found.tsx index 35b00a6f..150ef906 100644 --- a/src/views/not-found/not-found.tsx +++ b/src/views/not-found/not-found.tsx @@ -19,6 +19,7 @@ const NotFoundImage = () => { const NotFound = () => { const { subplebbitAddress } = useParams(); + const isValidSubplebbitAddress = !subplebbitAddress || subplebbitAddress.includes('.') || /^12D3K[a-zA-Z0-9]{44}$/.test(subplebbitAddress); const [theme, setTheme] = useTheme(); const previousThemeRef = useRef(theme); @@ -47,7 +48,7 @@ const NotFound = () => {
- {subplebbitAddress && ( + {subplebbitAddress && isValidSubplebbitAddress && ( <>