Skip to content

Commit

Permalink
Fix lazy undefined issues when overriding routes.
Browse files Browse the repository at this point in the history
  • Loading branch information
brionmario committed Jan 12, 2021
1 parent 9f6a5cc commit a4b0ee7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/console/src/extensions/extension-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ const loadRouteComponents = (routes: RouteInterface[]): RouteInterface[] => {

routes.map(route => {

// If a component is not defined. Don't load. Useful in overriding scenarios.
if (!route.component) {
return;
}

// When lazy loading the component the import will return an object if we directly
// pass the component path. Therefore we have overcome this issue by assigning it to a
// const.
Expand Down

0 comments on commit a4b0ee7

Please sign in to comment.