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

setHref is unsafe #3

Open
nsaunders opened this issue Apr 2, 2023 · 1 comment
Open

setHref is unsafe #3

nsaunders opened this issue Apr 2, 2023 · 1 comment

Comments

@nsaunders
Copy link

The issue is demonstrated here. Check the console to find the error. Providing an absolute URL to setHref seems to be the only way to avoid an error.

Regardless, the type of setHref should be String -> URL -> Maybe URL or similar, in order to convey the notion of failure.

@mjepronk
Copy link
Owner

mjepronk commented Apr 4, 2023

OK, good catch. I agree the type should be refactored to return Maybe URL. PR welcome :-)

Are there any use cases for setHref? If not, I'm also fine dropping this function from the API.

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

No branches or pull requests

2 participants