Simplify JsInvocation in case we not it's Array
^KT-40689 fixed
This commit is contained in:
committed by
TeamCityServer
parent
e98413740b
commit
6255f2bd77
+13
-6
@@ -171,13 +171,20 @@ fun translateCall(
|
||||
JsBlock(
|
||||
JsVars(JsVars.JsVar(receiverName, jsDispatchReceiver)),
|
||||
JsReturn(
|
||||
JsInvocation(
|
||||
JsNameRef("apply", JsNameRef(symbolName, receiverRef)),
|
||||
listOf(
|
||||
receiverRef,
|
||||
argumentsAsSingleArray
|
||||
if (argumentsAsSingleArray is JsArrayLiteral) {
|
||||
JsInvocation(
|
||||
JsNameRef(symbolName, receiverRef),
|
||||
argumentsAsSingleArray.expressions
|
||||
)
|
||||
)
|
||||
} else {
|
||||
JsInvocation(
|
||||
JsNameRef("apply", JsNameRef(symbolName, receiverRef)),
|
||||
listOf(
|
||||
receiverRef,
|
||||
argumentsAsSingleArray
|
||||
)
|
||||
)
|
||||
}
|
||||
)
|
||||
),
|
||||
"VarargIIFE"
|
||||
|
||||
Reference in New Issue
Block a user