We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea1d976 commit 5672081Copy full SHA for 5672081
docs/app/not-found.tsx
@@ -63,7 +63,7 @@ export default function NotFound() {
63
useEffect(() => {
64
const searchSimilarPages = async () => {
65
try {
66
- const pathSegments = pathname.split("/").filter(Boolean);
+ const pathSegments = (pathname ?? "").split("/").filter(Boolean);
67
const searchTerms = pathSegments.slice(-2).join(" ");
68
69
if (!searchTerms) {
0 commit comments