JS: fix crash when js function contains for statement w/o initializer
Fix KT-20898
This commit is contained in:
@@ -144,7 +144,7 @@ public class JsFor extends SourceInfoAwareJsNode implements JsStatement {
|
||||
if (initVars != null) {
|
||||
result = new JsFor(initVars.deepCopy(), conditionCopy, incrementalExprCopy, bodyCopy);
|
||||
} else {
|
||||
result = new JsFor(initExpression.deepCopy(), conditionCopy, incrementalExprCopy, bodyCopy);
|
||||
result = new JsFor(initExpression != null ? initExpression.deepCopy() : null, conditionCopy, incrementalExprCopy, bodyCopy);
|
||||
}
|
||||
|
||||
return result.withMetadataFrom(this);
|
||||
|
||||
Reference in New Issue
Block a user