You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(assertions): remove unnecessary condition for if statement in Template (#32028)
### Reason for this change
The following is the code in the `Template` constructor in the assertions module:
```ts
if (!templateParsingOptions?.skipCyclicalDependenciesCheck ?? true) {
checkTemplateForCyclicDependencies(this.template);
}
```
However, since the left operand (`!templateParsingOptions?.skipCyclicalDependenciesCheck`) is never undefined (null), the right operand (`?? true`) should not be needed. And the `templateParsingOptions` is not optional arg.
### Description of changes
```diff
- if (!templateParsingOptions?.skipCyclicalDependenciesCheck ?? true) {
+ if (!templateParsingOptions.skipCyclicalDependenciesCheck) {
checkTemplateForCyclicDependencies(this.template);
}
```
### Description of how you validated changes
A unit test.
### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
0 commit comments