Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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*
- Loading branch information