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

Check location.port for truthiness #1643

Merged
merged 1 commit into from
Nov 15, 2013
Merged

Conversation

matthewp
Copy link
Contributor

@matthewp matthewp commented Nov 7, 2013

According to the w3 spec for Window:

http://www.w3.org/TR/Window/#location

location.port might be null. This PR checks that it is truthy before checking for the port's length.

One place where location.port is null is within jsdom, so if you run less within Node, within jsdom, it throws an exception in this code.

According to the w3 spec for Window:

http://www.w3.org/TR/Window/#location

`location.port` might be null. This PR checks that it is truthy before checking for the port's length.

One place where location.port is null is within [jsdom](https://github.com/tmpvar/jsdom), so if you run less within Node, within jsdom, it throws an exception in this code.
@lukeapage
Copy link
Member

thanks.

lukeapage added a commit that referenced this pull request Nov 15, 2013
Check location.port for truthiness
@lukeapage lukeapage merged commit 7869d46 into less:master Nov 15, 2013
@matthewp matthewp deleted the location-port branch November 15, 2013 20:16
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.

None yet

2 participants