Skip to content

Commit

Permalink
Sonarcloud ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnan-aot committed Apr 9, 2024
1 parent 26bf06f commit 30b1b87
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export class GetApplicationInCartQueryParams {
})
@Type(() => Boolean)
@Transform(({ obj, key }: { obj: Record<string, unknown>; key: string }) => {
return obj[key] === 'true' ? true : obj[key] === 'false' ? false : obj[key];
if (obj[key] === 'true') return true;
return obj[key] === 'false' ? false : obj[key];
})
@IsOptional()
@IsBoolean()
Expand Down

0 comments on commit 30b1b87

Please sign in to comment.