-
Notifications
You must be signed in to change notification settings - Fork 352
Confuses default values in destructuring assignment #502
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
Comments
Can you paste that snippet as a code block and I can look into it? Also, is this on |
@amadeus This is definitely master. function createJobMetaLog(options, prefix = '') {
const { meta: { processor: { name, version } = {} } = {} } = options;
return `${prefix} ${name} v.${version}`;
}
function settingsHandler(options = {}) {
const { settings = {} } = options;
return {
getSetting(setting) {
return settings[setting];
}
};
} HOWEVER! I just tried the 'develop' branch on my .nvimrc and the syntax error is resolved. So, fix for this seems to be coming down the pipeline. |
Awesome, good to hear. Yeah, I just refactored how we handle destructuring, so glad to hear it's fixed. |
Your example was actually super helpful though, I've found another destructuring case that I didn't handle from before, so thanks for that! I'll get a PR together to improve |
Closing this as the issue that you found without realizing it, is now a PR for |
Uh oh!
There was an error while loading. Please reload this page.
http://imgur.com/n3f0Tat
As you can see, the second function loses syntax. It confuses the braces in the default assignment "settings" for closing braces.
It's weird that the top function also has destructuring but it does not flake out.
The text was updated successfully, but these errors were encountered: