diff --git a/generator/static/js/avatar/template.js b/generator/static/js/avatar/template.js index 54e9efd13a5afd77c1b349eab6c3b867d2f3c271..0ff516da26b3aa31ab80d13bc6b78cd5585a14d2 100644 --- a/generator/static/js/avatar/template.js +++ b/generator/static/js/avatar/template.js @@ -375,10 +375,7 @@ class AvatarTemplate { } } - if ( - this.darkIconDefaultSource.endsWith("Olomouc-kandidat.png") || - this.darkIconDefaultSource.endsWith("Olomouc-volim.png") - ) { + if (/.*Olomouc-(kandidat|volim).*\.png/.test(this.darkIconDefaultSource)) { this.context.globalCompositeOperation = "destination-in"; this.context.beginPath();