Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

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

Merged
merged 1 commit into from
Sep 23, 2019

Conversation

fd-rey
Copy link
Contributor

@fd-rey 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

@jasonrudolph jasonrudolph merged commit 19271dc into atom:master Sep 23, 2019
@jasonrudolph jasonrudolph self-assigned this Sep 23, 2019
@jasonrudolph
Copy link
Contributor

Thanks, @fd-rey. ⚡

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants