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

URI(undefined) now throws type error #196

Merged
merged 1 commit into from Mar 11, 2015

Conversation

Projects
None yet
3 participants
@yuhama
Contributor

yuhama commented Mar 11, 2015

Note that this differs from URI() which still works as a shortcut for
URI(location).

Since there is no reason to explicitly call URI with undefined, it is
safe to assume that this happens because of user error. URI now
correctly throws a type error with a message explaining that undefined
is not a valid argument.

URI(undefined) now throws type error
Note that this differs from URI() which still works as a shortcut for
URI(location).

Since there is no reason to explicitly call URI with undefined, it is
safe to assume that this happens because of user error. URI now
correctly throws a type error with a message explaining that undefined
is not a valid argument.

@yuhama yuhama referenced this pull request Mar 11, 2015

Closed

.equals(undefined) #189

rodneyrehm added a commit that referenced this pull request Mar 11, 2015

Merge pull request #196 from eakron/master
fixing `URI(undefined)` to throw TypeError

@rodneyrehm rodneyrehm merged commit b9b5635 into medialize:master Mar 11, 2015

@rodneyrehm

This comment has been minimized.

Show comment
Hide comment
@rodneyrehm

rodneyrehm Mar 31, 2015

Member

released v1.15.0, thank you for your support!

Member

rodneyrehm commented Mar 31, 2015

released v1.15.0, thank you for your support!

@KyleNeedham

This comment has been minimized.

Show comment
Hide comment
@KyleNeedham

KyleNeedham Apr 1, 2015

This breaks the ability to do URI() since it creates an instance of itself passing url, base which are both undefined.

See #205

This breaks the ability to do URI() since it creates an instance of itself passing url, base which are both undefined.

See #205

@yuhama

This comment has been minimized.

Show comment
Hide comment
@yuhama

yuhama Apr 1, 2015

Contributor

@KyleNeedham You should probably have tested that before commenting. And read the description of the pull request. The URI() short hand exists as a test in the code base and the tests all pass.

URI(undefined) no longer works, while URI() still works fine.

Contributor

yuhama commented Apr 1, 2015

@KyleNeedham You should probably have tested that before commenting. And read the description of the pull request. The URI() short hand exists as a test in the code base and the tests all pass.

URI(undefined) no longer works, while URI() still works fine.

@KyleNeedham

This comment has been minimized.

Show comment
Hide comment
@KyleNeedham

KyleNeedham Apr 1, 2015

@eakron Please read my issue. URI() does not work currently. You should probably have tested that.

@eakron Please read my issue. URI() does not work currently. You should probably have tested that.

@rodneyrehm

This comment has been minimized.

Show comment
Hide comment
@rodneyrehm

rodneyrehm Apr 1, 2015

Member

@KyleNeedham is correct, URI() breaks, while new URI() works. tests only exist for the latter.

Tracked in #205

Member

rodneyrehm commented Apr 1, 2015

@KyleNeedham is correct, URI() breaks, while new URI() works. tests only exist for the latter.

Tracked in #205

@yuhama

This comment has been minimized.

Show comment
Hide comment
@yuhama

yuhama Apr 1, 2015

Contributor

@rodneyrehm There are no tests for URI()? I see, that's unfortunate. I just assumed that after our discussion... My bad, do you want me to make a new pull request? We should add a test and fix the bug.

Contributor

yuhama commented Apr 1, 2015

@rodneyrehm There are no tests for URI()? I see, that's unfortunate. I just assumed that after our discussion... My bad, do you want me to make a new pull request? We should add a test and fix the bug.

@rodneyrehm

This comment has been minimized.

Show comment
Hide comment
@rodneyrehm

rodneyrehm Apr 1, 2015

Member

I've already added tests and fixed the issue, pushing just now…

Member

rodneyrehm commented Apr 1, 2015

I've already added tests and fixed the issue, pushing just now…

@yuhama

This comment has been minimized.

Show comment
Hide comment
@yuhama

yuhama Apr 1, 2015

Contributor

@rodneyrehm Sweet, nice catch.

Contributor

yuhama commented Apr 1, 2015

@rodneyrehm Sweet, nice catch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment