diff --git a/src/app/topic/indicators.component.ts b/src/app/topic/indicators.component.ts index 6f732b0..702b8b2 100644 --- a/src/app/topic/indicators.component.ts +++ b/src/app/topic/indicators.component.ts @@ -293,7 +293,9 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV } get charts(): Section[] { - if (this.topicIndex && this.categoryIndex && this.subcategoryIndex) { + if (this.stakeholder.topics[this.topicIndex] && + this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex] && + this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]) { return this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex].charts; } else { return []; @@ -305,7 +307,9 @@ export class IndicatorsComponent implements OnInit, OnDestroy, OnChanges, AfterV } get numbers(): Section[] { - if (this.topicIndex && this.categoryIndex && this.subcategoryIndex) { + if (this.stakeholder.topics[this.topicIndex] && + this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex] && + this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]) { return this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex].numbers; } else { return [];