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

Bug: The default username if none is specified is incorrect. #3

Closed
nickytonline opened this issue Dec 26, 2023 · 6 comments · Fixed by #8
Closed

Bug: The default username if none is specified is incorrect. #3

nickytonline opened this issue Dec 26, 2023 · 6 comments · Fixed by #8
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@nickytonline
Copy link
Owner

nickytonline commented Dec 26, 2023

Describe the bug

This code was a copy and paste error when I set up the project.

const username =
  Astro.url.searchParams.get("username") ??
  "astro-partykit-room" ??
  "Anonymous";

Expected behavior

It should be

const username =
  Astro.url.searchParams.get("username") ?? "anonymous";

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@nickytonline nickytonline added bug Something isn't working good first issue Good for newcomers labels Dec 26, 2023
Copy link

Thanks for the issue, our team will look into it as soon as possible! If you would like to work on this issue, please wait for us to decide if it's ready. The issue will be ready to work on once we remove the "needs triage" label.

To claim an issue that does not have the "needs triage" label, please leave a comment that says ".take".

For full info on how to contribute, please check out our contributors guide.

@nickytonline
Copy link
Owner Author

See these lines of code,

const username =
Astro.url.searchParams.get("username") ??
"astro-partykit-room" ??
"Anonymous";

And this is the change required.

- const username =
+ const username = Astro.url.searchParams.get("username") ?? "anonymous";
-  Astro.url.searchParams.get("username") ??
-  "astro-partykit-room" ??
-  "Anonymous";

@heysolomon
Copy link
Contributor

Hey @nickytonline can I jump on this?

@Aduwoayooluwa
Copy link

Hey @nickytonline can I jump on this?

Wanted to just ask about this too now too😅

@nickytonline
Copy link
Owner Author

nickytonline commented Dec 27, 2023

Just read the info in this comment to self assign it @heysolomon.

#3 (comment)

@heysolomon
Copy link
Contributor

Just read the info in this comment to self assign it @heysolomon.

#3 (comment)

.take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants