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

error destructuring binding in function parameters #12003

Closed
dimitriylol opened this issue Mar 23, 2017 · 1 comment
Closed

error destructuring binding in function parameters #12003

dimitriylol opened this issue Mar 23, 2017 · 1 comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. v8 engine Issues and PRs related to the V8 dependency.

Comments

@dimitriylol
Copy link

  • Version: v6.3.0
  • Platform: Linux 4.4.0-64-generic x86_64 GNU/Linux
  • Subsystem:

Such code fails in node, but works fine in chrome console:
const myConst = 'c';
const arr = [{ c: 10 }];
arr.every(({ [myConst]: n }) => n !== undefined)

Also, if you add one more statement with destructuring binding inside lambda, everything works fine.
const myConst = 'c';
const arr = [{ c: 10 }];
arr.every(({ [myConst]: n }) => n !== undefined);
arr.every((el) => {
const { [myConst]: num } = el;
return num !== undefined;
});

@targos
Copy link
Member

targos commented Mar 23, 2017

This has been fixed in #10386 and released in Node.js 6.9.3.
You will have to update your version of Node.

@targos targos closed this as completed Mar 23, 2017
@vsemozhetbyt vsemozhetbyt added duplicate Issues and PRs that are duplicates of other issues or PRs. v6.x v8 engine Issues and PRs related to the V8 dependency. labels Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues and PRs that are duplicates of other issues or PRs. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

3 participants