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

no-named-as-default-member -TypeError: Cannot read property 'name' of undefined #281

Closed
SimenB opened this issue Apr 27, 2016 · 1 comment · Fixed by #291
Closed

no-named-as-default-member -TypeError: Cannot read property 'name' of undefined #281

SimenB opened this issue Apr 27, 2016 · 1 comment · Fixed by #291
Labels

Comments

@SimenB
Copy link
Contributor

SimenB commented Apr 27, 2016

no-named-as-default-member.js:85:42

Unsure what source makes it crash... Narrowed it down to:

function someFunction() {
  switch (someVariable) {
    case 'something': {
      const { // The error is reported at the { on this line
        ...rest
      } = someGlobal;
    }
  }
}
@benmosher
Copy link
Member

Agh, must be the destructuring spread. Thanks for the heads up.

I think I want to build up cases like this and run against every rule to catch these kinds of gotchas.

Thanks for the tip!

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

Successfully merging a pull request may close this issue.

2 participants