mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-29 23:12:39 +01:00
Fixed: Time for episodes airing today being blank
This commit is contained in:
parent
62a9c2519b
commit
2a662afaef
@ -30,22 +30,21 @@ function getRelativeDate({
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (includeTime && !timeFormat) {
|
if ((includeTime || timeForToday) && !timeFormat) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"getRelativeDate: 'timeFormat' is required when 'includeTime' is true"
|
"getRelativeDate: 'timeFormat' is required when 'includeTime' or 'timeForToday' is true"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const isTodayDate = isToday(date);
|
const isTodayDate = isToday(date);
|
||||||
const time =
|
const time = timeFormat
|
||||||
includeTime && timeFormat
|
|
||||||
? formatTime(date, timeFormat, {
|
? formatTime(date, timeFormat, {
|
||||||
includeMinuteZero: true,
|
includeMinuteZero: true,
|
||||||
includeSeconds,
|
includeSeconds,
|
||||||
})
|
})
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
if (isTodayDate && timeForToday && timeFormat) {
|
if (isTodayDate && timeForToday) {
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user