Use the accessor body that gets passed in.

This commit is contained in:
Daniel Rosenwasser
2022-08-26 07:39:41 +00:00
parent 45d1e0dfb0
commit e086d6fee1
+2 -2
View File
@@ -128,7 +128,7 @@ namespace ts.codefix {
getSynthesizedDeepClone(name),
emptyArray,
getSynthesizedDeepClone(typeNode),
ambient ? undefined : createStubbedMethodBody(quotePreference)));
ambient ? undefined : getSynthesizedDeepClone(body) || createStubbedMethodBody(quotePreference)));
}
else {
Debug.assertNode(accessor, isSetAccessorDeclaration, "The counterpart to a getter should be a setter");
@@ -138,7 +138,7 @@ namespace ts.codefix {
getSynthesizedDeepClones(modifiers),
getSynthesizedDeepClone(name),
createDummyParameters(1, [parameterName], [getSynthesizedDeepClone(typeNode)], 1, /*inJs*/ false),
ambient ? undefined : createStubbedMethodBody(quotePreference)));
ambient ? undefined : getSynthesizedDeepClone(body) || createStubbedMethodBody(quotePreference)));
}
}
break;