Skip to content

Commit

Permalink
fix : renderRoute 내 targetRoute 없을 시 return 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
devbit4 committed Jan 7, 2024
1 parent 109b16e commit 541970f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const findRoute = (routes, pathname) => {
const renderRoute = () => {
const targetRoute = findRoute(pageRoutes, location.pathname);

if (!targetRoute) return;

const params = getParams(targetRoute);
const queryParams = getQueryParams(location.search);

Expand Down

0 comments on commit 541970f

Please sign in to comment.