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

Omit unnecessary returns #42

Closed
rstacruz opened this Issue Jun 10, 2011 · 2 comments

Comments

Projects
None yet
2 participants
@rstacruz
Copy link
Member

commented Jun 10, 2011

This as already being done, but could be improved.

function fn() {
  if (x) { return true; }
  else { return false; }
}

currently becomes:

fn = ->
  if x
    return true
  else
    return false

but should instead be:

fn = ->
  if x
    true
  else
    false

@rstacruz rstacruz closed this in 8758f3b Jun 10, 2011

@michaelficarra

This comment has been minimized.

Copy link
Contributor

commented Jun 10, 2011

This issue reminds me of #26...

@rstacruz rstacruz reopened this Jun 10, 2011

@rstacruz rstacruz closed this Jun 10, 2011

@rstacruz

This comment has been minimized.

Copy link
Member Author

commented Jun 10, 2011

Actually, I suppose this is a dupe of #26, yes. Oops.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.