Implement safety fallback for duration display.
parent
aa6a04f25b
commit
f5322f00e3
|
@ -34,7 +34,11 @@ export default function VideoListItem({
|
||||||
}) {
|
}) {
|
||||||
let displayDuration = null;
|
let displayDuration = null;
|
||||||
if (duration !== null) {
|
if (duration !== null) {
|
||||||
displayDuration = duration;
|
if (typeof duration === 'string') {
|
||||||
|
displayDuration = parseFloat(duration);
|
||||||
|
} else {
|
||||||
|
displayDuration = duration;
|
||||||
|
}
|
||||||
} else if (
|
} else if (
|
||||||
sourceVideoStart !== null
|
sourceVideoStart !== null
|
||||||
&& sourceVideoEnd !== null
|
&& sourceVideoEnd !== null
|
||||||
|
|
Loading…
Reference in New Issue