Skip to content

Fix issue #190 #274

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

Closed
wants to merge 1 commit into from
Closed

Fix issue #190 #274

wants to merge 1 commit into from

Conversation

elfman
Copy link
Contributor

@elfman elfman commented Aug 25, 2017

No description provided.

Copy link
Collaborator

@birdofpreyru birdofpreyru left a comment

Choose a reason for hiding this comment

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

@elfman

Also, note that all valid challenge IDs in the platform have the same length, so you should check the number of symbols in ID as well, and reject those with incorrect length.

@@ -56,6 +57,10 @@ class ChallengeDetailPageContainer extends React.Component {
const { challenge, loadChallengeDetails, loadTerms,
openTermsModal, authTokens, challengeId } = this.props;

if (isNaN(challengeId)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please, replace all occurances of isNaN(..) by _.isNumber(..) from lodash; because https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/isNaN (especially, check Confusing special-case behavior section there)

Copy link
Contributor Author

@elfman elfman Aug 29, 2017

Choose a reason for hiding this comment

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

the result of _.isNumber(NaN) is true, I will use _.isNaN() instead

@elfman
Copy link
Contributor Author

elfman commented Aug 29, 2017

I found some bug, I'm fixing it.

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