Fixed episode number in history

This commit is contained in:
Mark McDowall 2013-09-15 22:25:04 -07:00
parent 261751727b
commit de012aec21
1 changed files with 14 additions and 1 deletions

View File

@ -18,12 +18,25 @@ define(
var episodeField = this.column.get('episodes') || 'episodeNumber';
if (this.model) {
var result = 'Unknown';
var airDate = this.model.get(airDateField);
var seasonNumber = this.model.get(seasonField);
var episodes = this.model.get(episodeField);
var result = 'Unknown';
if (this.cellValue) {
if (!seasonNumber) {
seasonNumber = this.cellValue.get(seasonField);
}
if (!episodes) {
episodes = this.cellValue.get(episodeField);
}
if (!airDate) {
this.model.get(airDateField);
}
}
if (episodes) {