Fix for commit d111e8c

Fix commit d111e8c from PR #641 as it would sometimes break the card and year would not be displayed at all.
This commit is contained in:
Larvitar 2019-12-26 21:30:56 +01:00 committed by GitHub
parent 144164cd2a
commit 2b12a86cd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -893,7 +893,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'focusMana
if (item.EndDate && item.ProductionYear) {
var endYear = datetime.parseISO8601Date(item.EndDate).getFullYear();
lines.push(item.ProductionYear + (endYear === item.ProductionYear) ? '' : (' - ' + endYear));
lines.push(item.ProductionYear + ((endYear === item.ProductionYear) ? '' : (' - ' + endYear)));
} else {
lines.push(item.ProductionYear || '');
}