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

Infix operators within default argument declaration #293

Closed
reggi opened this issue Oct 15, 2015 · 3 comments

Comments

@reggi
Copy link
Contributor

commented Oct 15, 2015

Found it odd that standard isn't looking to change the first argument to state = {count: 0} instead.

function counter (state={count: 0}, action) {
  let count = state.count
  switch (action.type) {
    case 'increase':
      return {count: count + 1}
    default:
      return state
  }
}
@reggi

This comment has been minimized.

Copy link
Contributor Author

commented Oct 15, 2015

Turns out the standard command does report this, however the atom plugin does not.

@feross

This comment has been minimized.

Copy link
Member

commented Oct 15, 2015

You might want to check that you don't have two different copies of standard, one global and one local.

@reggi

This comment has been minimized.

Copy link
Contributor Author

commented Oct 15, 2015

Updated the plugin, I'm good now.

@reggi reggi closed this Oct 15, 2015

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

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