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

Test/fix setting all primitive types to null/undefined #89

Merged
merged 2 commits into from
Oct 22, 2015
Merged

Conversation

alazier
Copy link
Contributor

@alazier alazier commented Oct 22, 2015

Close #79

@appden

if (JSValueIsNull(ctx, value)) {
throw std::invalid_argument("`null` is not a number.");
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should check JSValueIsUndefined too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

JSValueToNumber throws for undefined so the extra check is unnecessary.

@appden
Copy link
Contributor

appden commented Oct 22, 2015

Can you rebase this after merging the other PR since it contains duplicate commits.

@appden
Copy link
Contributor

appden commented Oct 22, 2015

CI looks borked. Looks good to merge! 👍

alazier added a commit that referenced this pull request Oct 22, 2015
Test/fix setting all primitive types to null/undefined
@alazier alazier merged commit 33edd04 into master Oct 22, 2015
@alazier alazier deleted the al-null branch October 26, 2015 19:45
fealebenpae pushed a commit that referenced this pull request Aug 2, 2016
Enable more warnings (and fix them)
alazier added a commit that referenced this pull request Sep 14, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants