Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix not found 404 when route to session from speaker view #238

Merged
Merged
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
3 changes: 2 additions & 1 deletion webapp/src/views/schedule/speakers/item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
mounted() {},
methods: {
generateSessionLinkUrl(sessionData) {
return `/schedule/talks/${sessionData.session.id}`
const publicPath = process.env.BASE_URL || '/video/';

Check failure on line 68 in webapp/src/views/schedule/speakers/item.vue

View workflow job for this annotation

GitHub Actions / build

Extra semicolon
return `${publicPath}schedule/talks/${sessionData.session.id}`;

Check failure on line 69 in webapp/src/views/schedule/speakers/item.vue

View workflow job for this annotation

GitHub Actions / build

Extra semicolon
Comment on lines +68 to +69
Copy link

Choose a reason for hiding this comment

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

issue (bug_risk): Consider potential issues with dynamic base URL in generateSessionLinkUrl

The change introduces a dynamic base URL, which could lead to inconsistent URL generation. Consider the following:

  1. Is process.env.BASE_URL guaranteed to be set in all environments?
  2. The fallback value '/video/' seems arbitrary. Is this intentional?
  3. There's a potential for double slashes in the URL if BASE_URL ends with a slash.

}
}
}
Expand Down
Loading