Skip to content

Commit

Permalink
Default route name to home
Browse files Browse the repository at this point in the history
  • Loading branch information
abraham committed Sep 4, 2023
1 parent d4c4e94 commit e0b19c1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ window.addEventListener('vaadin-router-location-changed', (event) => {
export const selectRouteName = (pathname: string): string => {
let [, part] = pathname.split('/');
switch (part) {
case undefined:
case '':
part = 'home';
break;

case 'sessions':
part = 'schedule';
break;
Expand All @@ -35,7 +30,7 @@ export const selectRouteName = (pathname: string): string => {
break;
}

return part;
return part || 'home';
};

const ROUTES: Route[] = [
Expand Down

0 comments on commit e0b19c1

Please sign in to comment.