Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions docs/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ const { defaultDocsLandingPage } = config.customFields

function Home() {
const location = useLocation()
const defaultUrl = [
location.pathname.replace(/\/$/, ''),
'docs',
defaultDocsLandingPage,
].join('/')

]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The defaultUrl is now an empty array, which will cause the Redirect component to fail as it expects a valid URL string.

Suggestion:

const defaultUrl = [
  location.pathname.replace(/\/$/, ''),
  'docs',
  defaultDocsLandingPage,
].join('/')

return <Redirect to={defaultUrl} />
}

Expand Down