Skip to content

Make processTaggedTemplateExpression visit a returned node#38596

Merged
elibarzilay merged 1 commit into
microsoft:masterfrom
elibarzilay:38558
May 15, 2020
Merged

Make processTaggedTemplateExpression visit a returned node#38596
elibarzilay merged 1 commit into
microsoft:masterfrom
elibarzilay:38558

Conversation

@elibarzilay

Copy link
Copy Markdown
Contributor

This problem was introduced in 70399e1 (from PR #23801), which added
a visitTaggedTemplateExpression case for TaggedTemplateExpression,
before that, it would fallback to the default of visitNode. So re-add
that happen in processTaggedTemplateExpression.

Since it doesn't hurt, I left a Debug.checkDefined(property.name)
instead of !-ing it.

Fixes #38558.

Comment thread src/compiler/transformers/es2015.ts

@Kingwl Kingwl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my bad.

This problem was introduced in 70399e1 (from PR microsoft#23801), which added
a `visitTaggedTemplateExpression` case for `TaggedTemplateExpression`,
before that, it would fallback to the default of `visitNode`.  So re-add
that happen in `processTaggedTemplateExpression`.

Since it doesn't hurt, I left a `Debug.checkDefined(property.name)`
instead of `!`-ing it.

Fixes microsoft#38558.
@eliasjnior

Copy link
Copy Markdown

I could run with yarn add [email protected] and the error stoped!

@dandrei

dandrei commented May 21, 2020

Copy link
Copy Markdown

@eliasjnior that's because the problem didn't exist in 3.8.3.
But the problem is still present in 3.9.3. See: vercel/next.js#12854

@elibarzilay

Copy link
Copy Markdown
Contributor Author

@dandrei: this is most likely a different problem -- #38383 (which I couldn't reproduce).

@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Visitor throws Cannot read property 'kind' of undefined using [email protected]

7 participants