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

was trying to find var, found bug #3454

Closed
danschumann opened this issue Apr 26, 2014 · 1 comment
Closed

was trying to find var, found bug #3454

danschumann opened this issue Apr 26, 2014 · 1 comment

Comments

@danschumann
Copy link

I was trying to find a nice way to do var me without doing me = null. I don't want to be null, you see...

me=;

fetchUser()

  .then((_me) =>
    me = _me
    fetchFriend()
  )
  .then((_you) =>
    me.friend(_you)
  )
  .then(done)
  .otherwise(=>
    console.log ':('
  )

compiles to

var me;

me = fetchUser().then((function(_this) {
  return function(_me) {
    me = _me;
    return fetchFriend();
  };
})(this)).then((function(_this) {
  return function(_you) {
    return me.friend(_you);
  };
})(this)).then(done).otherwise((function(_this) {
  return function() {
    return console.log(':(');
  };
})(this));

so you see it ignored the semicolon and did me = fetchUser()..

@michaelficarra
Copy link
Collaborator

Duplicate of #3098.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants