mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 11:35:42 -06:00
Fix the name when synthesized node is clone of auto generate identifier kind
This fixes variable declaration created for default exported class without name Fixes #7875
This commit is contained in:
parent
5e308b9b9a
commit
219f1b0166
@ -2607,8 +2607,10 @@ const _super = (function (geti, seti) {
|
||||
function getSourceNodeForGeneratedName(name: Identifier) {
|
||||
let node: Node = name;
|
||||
while (node.original !== undefined) {
|
||||
const nodeId = node.id;
|
||||
node = node.original;
|
||||
if (isIdentifier(node) && node.autoGenerateKind === GeneratedIdentifierKind.Node) {
|
||||
// If this is not the exact clone of identifier use this identifier to generate the name
|
||||
if (isIdentifier(node) && node.autoGenerateKind === GeneratedIdentifierKind.Node && node.id !== nodeId) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user