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

Fix for...of autocomplete, variable declaration #631

Merged
merged 1 commit into from Sep 23, 2019
Merged

Conversation

@fd-rey
Copy link
Contributor

fd-rey commented Nov 21, 2018

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

Following the for...of reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of

The variable declaration with "var" is missing and the autogenerated snippet produces a ReferenceError
if the variable used in the for is not declared previously in the code.

Alternate Designs

Benefits

The forof autocomplete snippet can be used safely.

Possible Drawbacks

If the user wants to use an already declared variable, the declaration with "var" in the for has to be removed manually.

Applicable Issues

#596

Following the for...of reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of
The variable declaration with "var" is missing.
@jasonrudolph jasonrudolph merged commit 19271dc into atom:master Sep 23, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jasonrudolph jasonrudolph self-assigned this Sep 23, 2019
@jasonrudolph

This comment has been minimized.

Copy link
Member

jasonrudolph commented Sep 23, 2019

Thanks, @fd-rey. ⚡️

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