Skip to content

Commit 79bf477

Browse files
committed
Revert "Instead of creating clone of the jsxFactory's leaf node, create synthesized node"
This reverts commit 4e7313b.
1 parent 4e7313b commit 79bf477

File tree

5 files changed

+10
-98
lines changed

5 files changed

+10
-98
lines changed

src/compiler/factory.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,10 +1677,16 @@ namespace ts {
16771677

16781678
function createJsxFactoryExpressionFromEntityName(jsxFactory: EntityName, parent: JsxOpeningLikeElement): Expression {
16791679
if (isQualifiedName(jsxFactory)) {
1680-
const left = createJsxFactoryExpressionFromEntityName(jsxFactory.left, parent);
1681-
const right = <Identifier>createSynthesizedNode(SyntaxKind.Identifier);
1682-
right.text = jsxFactory.right.text;
1683-
return createPropertyAccess(left, right);
1680+
return createPropertyAccess(
1681+
createJsxFactoryExpressionFromEntityName(
1682+
jsxFactory.left,
1683+
parent
1684+
),
1685+
setEmitFlags(
1686+
getMutableClone(jsxFactory.right),
1687+
EmitFlags.NoSourceMap
1688+
)
1689+
);
16841690
}
16851691
else {
16861692
return createReactNamespace(jsxFactory.text, parent);

tests/baselines/reference/jsxFactoryQualifiedNameWithEs5.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

tests/baselines/reference/jsxFactoryQualifiedNameWithEs5.symbols

Lines changed: 0 additions & 23 deletions
This file was deleted.

tests/baselines/reference/jsxFactoryQualifiedNameWithEs5.types

Lines changed: 0 additions & 27 deletions
This file was deleted.

tests/cases/compiler/jsxFactoryQualifiedNameWithEs5.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)