Skip to content

Commit

Permalink
use ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
msambol committed Mar 1, 2024
1 parent 83bef46 commit 677090f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/aws-cdk-lib/aws-ecs/lib/runtime-platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,8 @@ export class OperatingSystemFamily {
* Returns true if the operating system family is Windows
*/
public isWindows(): boolean {
if (this._operatingSystemFamily?.toLowerCase().includes('windows')) {
return true;
}
return false;
return this._operatingSystemFamily?.toLowerCase().startsWith('windows') ? true : false;
}

}

/**
Expand Down

0 comments on commit 677090f

Please sign in to comment.