Skip to content

Commit bbf7753

Browse files
authored
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)
1 parent f356cd6 commit bbf7753

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/services/codefixes/convertToAsyncFunction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ namespace ts.codefix {
410410
break;
411411
}
412412

413-
const synthCall = createCall(getSynthesizedDeepClone(func as Identifier), /*typeArguments*/ undefined, argName ? [argName.identifier] : emptyArray);
413+
const synthCall = createCall(getSynthesizedDeepClone(func as Identifier), /*typeArguments*/ undefined, [argName.identifier]);
414414
if (shouldReturn) {
415415
return [createReturn(synthCall)];
416416
}

0 commit comments

Comments
 (0)