Skip to content

Commit 6767899

Browse files
committed
Address linting and SonarQube errors
1 parent 286d57a commit 6767899

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/util/Browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class Browser {
7575
return false;
7676
}
7777

78-
return this.isSafari() && parseFloat(version) >= 11;
78+
return this.isSafari() && Number.parseFloat(version) >= 11;
7979
}
8080

8181
public getVideoType(video: HTMLVideoElement) {

src/wrappers/visuals/inside/recorder/countdown.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class Countdown {
4949
}
5050

5151
if (typeof this.options.video.countdown !== "number") {
52-
throw new Error(
52+
throw new TypeError(
5353
`The defined countdown is not a valid number: ${this.options.video.countdown}`,
5454
);
5555
}

src/wrappers/visuals/replay.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ class Replay extends Despot {
366366
firstTrack.setAttribute("src", src);
367367
} else {
368368
// Remove when no captions available
369-
this.replayElement.removeChild(firstTrack);
369+
firstTrack.remove();
370370
}
371371
} else {
372372
// Insert one then
@@ -420,7 +420,7 @@ class Replay extends Despot {
420420
} else if (src) {
421421
source.setAttribute("src", src);
422422
} else {
423-
this.replayElement.removeChild(source);
423+
source.remove();
424424
}
425425
}
426426

0 commit comments

Comments
 (0)