Skip to content

Commit 051f246

Browse files
brad4dcopybara-github
authored andcommitted
Es6ExtractClasses: correct use of ExpressionDecomposer
ExpressionDecomposer.maybeExposeExpression() guarantees that the expression is fully exposed and should be used instead of ExpressionDecomposer.exposeExpression(). PiperOrigin-RevId: 321810429
1 parent b8e2f0e commit 051f246

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/google/javascript/jscomp/Es6ExtractClasses.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ private boolean shouldExtractClass(Node classNode) {
179179

180180
private void extractClass(NodeTraversal t, Node classNode) {
181181
if (expressionDecomposer.canExposeExpression(classNode) == DecompositionType.DECOMPOSABLE) {
182-
expressionDecomposer.exposeExpression(classNode);
182+
expressionDecomposer.maybeExposeExpression(classNode);
183183
}
184184
Node parent = classNode.getParent();
185185

0 commit comments

Comments
 (0)