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: remove unnecessary parameters in USVString calls #3467

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

Uzlopak
Copy link
Contributor

@Uzlopak Uzlopak commented Aug 16, 2024

USVString only expects a value parameter.

@ronag ronag requested a review from KhafraDev August 16, 2024 15:14
Copy link
Member

@KhafraDev KhafraDev left a comment

Choose a reason for hiding this comment

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

I think errors coming from toUSVString should match the rest of the webidl impl. Can toWellFormed throw?

@Uzlopak
Copy link
Contributor Author

Uzlopak commented Aug 16, 2024

I dont think that toWellFormed can throw. Its basically a put any garbage in and get a valid/well formed string back.

Wdyt?

@KhafraDev
Copy link
Member

It technically can throw, but not in any way undici is using it.

String.prototype.toWellFormed.call(Symbol() / null / undefined)

@Uzlopak Uzlopak merged commit 6ee9ccd into nodejs:main Aug 16, 2024
33 checks passed
@Uzlopak Uzlopak deleted the fix-usvstring-call branch August 16, 2024 20:17
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