Remove unneeded check from getTransformationBody

Remove unneeded `argName` check, because it always evaluates to `true` (the `false` case is handled just before the modified line)
This commit is contained in:
Alessandro Vergani 2018-10-02 16:02:04 +02:00 committed by GitHub
parent f356cd6c89
commit bbf77538c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -410,7 +410,7 @@ namespace ts.codefix {
break;
}
const synthCall = createCall(getSynthesizedDeepClone(func as Identifier), /*typeArguments*/ undefined, argName ? [argName.identifier] : emptyArray);
const synthCall = createCall(getSynthesizedDeepClone(func as Identifier), /*typeArguments*/ undefined, [argName.identifier]);
if (shouldReturn) {
return [createReturn(synthCall)];
}