Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
TaggedTemplateLiteral
evaluation (#15224)
* 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') : [] ``` * Add test * Review by liuxingbaoyu Co-authored-by: Nicol貌 Ribaudo <nicolo.ribaudo@gmail.com>
- Loading branch information
1 parent
8e03800
commit d3bce24
Showing
2 changed files
with
24 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters