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

Fixes incorrect response #5

Closed
wants to merge 1 commit into from
Closed

Conversation

vatson
Copy link

@vatson vatson commented Jun 10, 2013

No description provided.

@paulbjensen
Copy link
Contributor

I'd be tempted to recommend setting a local variable err with the value null as the first line of the square function, so that the order and context of the response items is clear, e.g.

    squareNumber: function(number) {
      var err, result = null, null;
      typeof number !== 'number' ? err = 'Must be a number' : result = number * number;
      res(err, result);

@davisford
Copy link
Contributor

Looks good to me :)

@paulbjensen
Copy link
Contributor

I'm going to close the issue. Thank you @vatson for taking the time to fork the repo and make a PR, I'm sorry we didn't make use of it this time.

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.

3 participants