Optimize chapter end time handling in artplayer-plugin-chapter

This commit is contained in:
Harvey Zack committed 2024-06-03 11:51:58 +08:00
1 parent 586375eeb0
commit e11a2da806
5 files changed
+8 -3

No files matched your search

@@ -54,6 +54,10 @@ export default function artplayerPluginChapter(option = {}) {
const chapter = chapters[i];
const nextChapter = chapters[i + 1];
if (chapter.end === Infinity) {
chapter.end = art.duration;
}
if (
typeof chapter.start !== 'number' ||
typeof chapter.end !== 'number' ||