Add missing guards (#2067)

This commit is contained in:
Thomas Kaul
2023-06-10 16:16:27 +02:00
committed by GitHub
parent 6f7e370fca
commit 04eb452e04
2 changed files with 5 additions and 5 deletions

View File

@@ -100,7 +100,7 @@ export class PortfolioProportionChartComponent
};
Object.keys(this.positions).forEach((symbol) => {
if (this.positions[symbol][this.keys[0]].toUpperCase()) {
if (this.positions[symbol][this.keys[0]]?.toUpperCase()) {
if (chartData[this.positions[symbol][this.keys[0]].toUpperCase()]) {
chartData[this.positions[symbol][this.keys[0]].toUpperCase()].value =
chartData[