Skip to content

Commit

Permalink
Handle metrics that has no filepath
Browse files Browse the repository at this point in the history
  • Loading branch information
chuanlin2018 committed Dec 13, 2023
1 parent bfaba15 commit ca9b673
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion angular/src/app/landing/landingpage.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,10 @@ export class LandingPageComponent implements OnInit, AfterViewInit {
let filepath = this.md.components[i].filepath;
if(filepath) filepath = filepath.trim();

this.metricsData.hasCurrentMetrics = this.fileLevelMetrics.FilesMetrics.find(x => x.filepath.substr(x.filepath.indexOf(ediid)+ediid.length+1).trim() == filepath) != undefined;
this.metricsData.hasCurrentMetrics = this.fileLevelMetrics.FilesMetrics.find(x => {
x.filepath? x.filepath.substr(x.filepath.indexOf(ediid)+ediid.length+1).trim() == filepath : false
}) != undefined;

if(this.metricsData.hasCurrentMetrics) break;
}
}else{
Expand Down

0 comments on commit ca9b673

Please sign in to comment.