Using regex match instead of endsWith for better browser compatibility

pull/3113/head
Mark McDowall 11 years ago
parent e10a5ca213
commit 94f64567c6

@ -64,7 +64,7 @@ define(
}); });
Handlebars.registerHelper('titleWithYear', function () { Handlebars.registerHelper('titleWithYear', function () {
if (this.title.endsWith(' ({0})'.format(this.year))) { if (this.title.match(/\s\(\d{4}\)$/)) {
return this.title; return this.title;
} }

Loading…
Cancel
Save