Skip to content

Commit

Permalink
Added optional check in toc page
Browse files Browse the repository at this point in the history
  • Loading branch information
venkykandagaddala committed Jul 25, 2024
1 parent 44a3caa commit f6c1ed8
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class AppTocAboutComponent implements OnInit, OnChanges, AfterViewInit, O
this.loadCompetencies()
}

if (this.content && this.content.contentId.includes('ext_')) {
if (this.content && this.content.contentId && this.content.contentId.includes('ext_')) {
this.loadCompetencies()
}

Expand All @@ -210,25 +210,25 @@ export class AppTocAboutComponent implements OnInit, OnChanges, AfterViewInit, O
if (changes.selectedTabValue && changes.selectedTabValue.currentValue === 0) {
setTimeout(() => {
if (!this.isMobile) {
if (this.summaryElem.nativeElement.offsetHeight > 72) {
if (this.summaryElem && this.summaryElem.nativeElement.offsetHeight > 72) {
this.summary.ellipsis = true
}

if (this.descElem.nativeElement.offsetHeight > 72) {
if (this.descElem && this.descElem.nativeElement.offsetHeight > 72) {
this.description.ellipsis = true
}
if (this.objectivesElem.nativeElement.offsetHeight > 72) {
if (this.objectivesElem && this.objectivesElem.nativeElement.offsetHeight > 72) {
this.objectives.ellipsis = true
}
} else {
if (this.summaryElem.nativeElement.offsetHeight > 48) {
if (this.summaryElem && this.summaryElem.nativeElement.offsetHeight > 48) {
this.summary.ellipsis = true
}

if (this.descElem.nativeElement.offsetHeight > 48) {
if (this.descElem && this.descElem.nativeElement.offsetHeight > 48) {
this.description.ellipsis = true
}
if (this.objectivesElem.nativeElement.offsetHeight > 48) {
if (this.objectivesElem && this.objectivesElem.nativeElement.offsetHeight > 48) {
this.objectives.ellipsis = true
}
}
Expand Down

0 comments on commit f6c1ed8

Please sign in to comment.