Browse Source

Improved nested ternary by using early return (Sonarqube S3358)

pull/7784/head
Lyndros 2 months ago
parent
commit
9e2aae7b41
  1. 6
      CHANGELOG.md
  2. 12
      libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts

6
CHANGELOG.md

@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Added
- Improved nested ternary by using early return (Sonarqube S3358)
## 3.65.0 - 2026-08-31 ## 3.65.0 - 2026-08-31
### Added ### Added

12
libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts

@ -397,11 +397,13 @@ export class GfPortfolioProportionChartComponent
context.dataIndex context.dataIndex
] as string; ] as string;
return value > 0 if (value <= 0) {
? isUUID(symbol) return '';
? (this.data[symbol]?.name ?? symbol) }
: symbol
: ''; return isUUID(symbol)
? (this.data[symbol]?.name ?? symbol)
: symbol;
}, },
offset: 8 offset: 8
} }

Loading…
Cancel
Save