Skip to content

Commit a67a749

Browse files
committed
Emit Object.assign for spread for targets >= ES6
1 parent 5282a8d commit a67a749

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/transformers/esnext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ namespace ts {
402402
};
403403

404404
export function createAssignHelper(context: TransformationContext, attributesSegments: Expression[]) {
405-
if (context.getCompilerOptions().target === ScriptTarget.ES2015) {
405+
if (context.getCompilerOptions().target >= ScriptTarget.ES2015) {
406406
return createCall(createPropertyAccess(createIdentifier("Object"), "assign"),
407407
/*typeArguments*/ undefined,
408408
attributesSegments);

0 commit comments

Comments
 (0)