mirror of
https://github.com/servo/servo.git
synced 2025-07-23 15:23:42 +01:00
Use Number.isFinite() to check position percentage
This commit is contained in:
parent
87bee50c20
commit
04a40138d0
1 changed files with 1 additions and 1 deletions
|
@ -227,7 +227,7 @@
|
|||
|
||||
// Progress.
|
||||
const positionPercent = this.media.currentTime / this.media.duration * 100;
|
||||
if (!isNaN(positionPercent) && positionPercent != Infinity) {
|
||||
if (Number.isFinite(positionPercent)) {
|
||||
this.elements.progress.value = positionPercent;
|
||||
} else {
|
||||
this.elements.progress.value = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue