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 a path building issue #45

Merged
merged 2 commits into from
Mar 21, 2024
Merged

fix a path building issue #45

merged 2 commits into from
Mar 21, 2024

Conversation

gnarf
Copy link
Contributor

@gnarf gnarf commented Mar 21, 2024

I think this might've snuck in with the latest TSC stuff but I ran into an error of "Invalid URL" when trying to run latest main on my machine.

noticed there was a doubled : and / in the base url here http:://127.0.0.1:1234//url is what it looked like

@gnarf gnarf requested a review from jugglinmike March 21, 2024 15:14
const base = `${this.baseUrl.protocol}://${this.baseUrl.hostname}:${this.baseUrl.port}/${this.baseUrl.pathname}`;
// protocol ends with a ':' and pathname starts with a '/'
const base = `${this.baseUrl.protocol}//${this.baseUrl.hostname}:${this.baseUrl.port}${this.baseUrl.pathname}`;
const urlPart = `${this.baseUrl.pathname ? `${this.baseUrl.pathname}/` : ''}${pathname}`;
Copy link
Contributor

Choose a reason for hiding this comment

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

This variable is unused. (It's concerning that this wasn't flagged in CI...)

Copy link
Contributor Author

@gnarf gnarf Mar 21, 2024

Choose a reason for hiding this comment

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

agree on concern - pushed fix (for this issue, not the concern)

Copy link
Contributor

Choose a reason for hiding this comment

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

#46

@jugglinmike jugglinmike merged commit 140077e into w3c:main Mar 21, 2024
4 checks passed
@gnarf gnarf deleted the fix-path-issue branch March 21, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants