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 TaggedTemplateLiteral evaluation #15224

Merged
merged 3 commits into from Jan 3, 2023
Merged

Fix TaggedTemplateLiteral evaluation #15224

merged 3 commits into from Jan 3, 2023

Commits on Jan 2, 2023

  1. Fix TaggedTemplate evaluation bug

    This line of code causes a type error since `TaggedTemplateLiteral`s do not have a property called "expressions".
    
    This change does what is probably expected. However, to maintain the existing behaviour, the line should instead be:
    
    ```js
    const exprs: Array<undefined | NodePath<t.Node>> = path.isTemplateLiteral()
        ? path.get('expressions')
        : []
    ```
    nmn authored and nicolo-ribaudo committed Jan 2, 2023
    Copy the full SHA
    a143a20 View commit details
    Browse the repository at this point in the history
  2. Add test

    nicolo-ribaudo committed Jan 2, 2023
    Copy the full SHA
    37b300f View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    02bea04 View commit details
    Browse the repository at this point in the history