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

Change NaN detection in isValid to work in Safari #31

Merged
merged 2 commits into from
May 27, 2015

Conversation

marcprux
Copy link
Member

Safari doesn't implement Number.isNaN (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN), so re-implemented it with a combination is global isNaN (which performs type coercion) and checking to see if object is a number.

Safari doesn't implement Number.isNaN (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN), so re-implemented it with a combination is global isNaN (which performs type coercion) and checking to see if object is a number.
@jheer
Copy link
Member

jheer commented May 27, 2015

Thanks, looks good accept that obj === obj could provide a faster NaN check. What about: obj != null && obj === obj?

@marcprux
Copy link
Member Author

Sounds good to me.

- Marc

On May 27, 2015, at 2:09 AM, Jeffrey Heer notifications@github.com wrote:

Thanks, looks good accept that obj === obj could provide a faster NaN check. What about: obj != null && obj === obj?


Reply to this email directly or view it on GitHub.

jheer added a commit that referenced this pull request May 27, 2015
@jheer jheer merged commit 45e2e15 into vega:master May 27, 2015
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