[CR] Fix falsey comparison for chapters
Fix chapter being ignored if chapter start time was 0 (thanks javascript falsey comparison)
This commit is contained in:
parent
250c8925a4
commit
74da730dc4
1 changed files with 1 additions and 1 deletions
|
|
@ -1279,7 +1279,7 @@ export default class Crunchy implements ServiceClass {
|
|||
chapters.sort((a, b) => a.start - b.start);
|
||||
//Loop through all the chapters
|
||||
for (const chapter of chapters) {
|
||||
if (!chapter.start || !chapter.end) continue;
|
||||
if (typeof chapter.start == 'undefined' || typeof chapter.end == 'undefined') continue;
|
||||
//Generate timestamps
|
||||
const startTime = new Date(0), endTime = new Date(0);
|
||||
startTime.setSeconds(chapter.start);
|
||||
|
|
|
|||
Loading…
Reference in a new issue