Skip to content

Commit

Permalink
undefined for certificateTemplateUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
mansurskTarento committed Mar 3, 2025
1 parent 20340b4 commit 7965980
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,17 @@ export class TransformationsComponent implements OnInit, OnChanges {
}

getImageName(url: string): string {
const lastSlashIndex = url.lastIndexOf('/')
const imageWithPrefix = url.slice(lastSlashIndex + 1)
const firstUnderscoreIndex = imageWithPrefix.indexOf('_')
if (firstUnderscoreIndex !== -1) {
return imageWithPrefix.slice(firstUnderscoreIndex + 1)
}
if (url) {
const lastSlashIndex = url.lastIndexOf('/')
const imageWithPrefix = url.slice(lastSlashIndex + 1)
const firstUnderscoreIndex = imageWithPrefix.indexOf('_')
if (firstUnderscoreIndex !== -1) {
return imageWithPrefix.slice(firstUnderscoreIndex + 1)
}

return imageWithPrefix
return imageWithPrefix
}
return url
}

ngOnInit(): void {
Expand Down

0 comments on commit 7965980

Please sign in to comment.