Skip to content

Commit

Permalink
Fixing bug in routes.
Browse files Browse the repository at this point in the history
  • Loading branch information
krulis-martin committed Jan 4, 2025
1 parent 2e41b9f commit 43d6b61
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pages/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const getRedirect = (routeObj, urlPath, isLoggedIn) => {
*/
export const match = (urlPath, isLoggedIn) => {
const routeObj = routesDescriptors.find(({ route }) => matchPath(route, urlPath) !== null);
const component = unwrap(routeObj.component);
const component = routeObj && unwrap(routeObj.component);

const redirect = getRedirect(routeObj, urlPath, isLoggedIn);
const match = matchPath(routeObj.route, urlPath);
Expand Down Expand Up @@ -157,7 +157,6 @@ export const getLinks = () => {
linksCache = {
API_BASE,
GITHUB_BUGS_URL: 'https://github.com/ReCodEx/SIS-ext-webapp/issues',
LOGIN_EXTERN_FINALIZATION_URI_FACTORY: service => `${URL_PATH_PREFIX}/login-extern/${service}`,
};

// Gather links from router descriptors
Expand Down

0 comments on commit 43d6b61

Please sign in to comment.