mirror of
https://github.com/Radarr/Radarr
synced 2025-02-26 16:13:19 +00:00
Fix alternative titles, if there is only one.
This commit is contained in:
parent
eb46343ce8
commit
a63587bb19
1 changed files with 6 additions and 0 deletions
|
@ -57,6 +57,12 @@ Handlebars.registerHelper('homepage', function() {
|
|||
|
||||
Handlebars.registerHelper('alternativeTitlesString', function() {
|
||||
var titles = this.alternativeTitles;
|
||||
if (titles.length == 0) {
|
||||
return "";
|
||||
}
|
||||
if (titles.length == 1) {
|
||||
return titles[0];
|
||||
}
|
||||
return titles.slice(0,titles.length-1).join(", ") + " and " + titles[titles.length-1];
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue