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

lesson #4 #136

Open
isomorphisms opened this issue Oct 31, 2017 · 1 comment
Open

lesson #4 #136

isomorphisms opened this issue Oct 31, 2017 · 1 comment

Comments

@isomorphisms
Copy link

what exactly is the bug in

(user,callback) => {
  if (user) { callback(null,user) ; }
  return callback( "No user found", null)
  }

?

@addaleax
Copy link
Collaborator

addaleax commented Nov 1, 2017

@isomorphisms I think you want to return; inside the if block as well, otherwise you first run the callback with callback(null, user); and then with callback( "No user found", null);?

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

No branches or pull requests

2 participants