Skip to content

Commit adfefab

Browse files
committed
chore: remove type assertion in getAwsGlobalConfig
1 parent 26471cd commit adfefab

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/transforms/v2-to-v3/client-instances/getAwsGlobalConfig.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ export const getAwsGlobalConfig = (
2828
property: { type: "Identifier", name: "update" },
2929
},
3030
})
31-
.filter(
32-
({ node }) => node.arguments.length === 1 && node.arguments[0].type === "ObjectExpression"
33-
)
34-
.forEach(({ node }) => {
35-
const objectExpressionProperties = (node.arguments[0] as ObjectExpression).properties;
31+
.forEach((callExpression) => {
32+
const node = callExpression.node;
33+
if (node.arguments.length !== 1 || node.arguments[0].type !== "ObjectExpression") {
34+
return;
35+
}
3636

37+
const objectExpressionProperties = node.arguments[0].properties;
3738
objectExpressionProperties.forEach((property) => {
3839
objectExpression.properties.push(property);
3940
});

0 commit comments

Comments
 (0)