mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +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.
|
// Progress.
|
||||||
const positionPercent = this.media.currentTime / this.media.duration * 100;
|
const positionPercent = this.media.currentTime / this.media.duration * 100;
|
||||||
if (!isNaN(positionPercent) && positionPercent != Infinity) {
|
if (Number.isFinite(positionPercent)) {
|
||||||
this.elements.progress.value = positionPercent;
|
this.elements.progress.value = positionPercent;
|
||||||
} else {
|
} else {
|
||||||
this.elements.progress.value = 0;
|
this.elements.progress.value = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue