refactor: use replaceChildren instead of innerHTML assignment
This commit is contained in:
@@ -56,7 +56,7 @@ export const resolveActiveSegments = (): void => {
|
|||||||
export const renderSegments = (): void => {
|
export const renderSegments = (): void => {
|
||||||
const track = state.elements.container.querySelector("[data-segments]") as HTMLElement | null;
|
const track = state.elements.container.querySelector("[data-segments]") as HTMLElement | null;
|
||||||
if (!track) return;
|
if (!track) return;
|
||||||
track.innerHTML = "";
|
track.replaceChildren();
|
||||||
|
|
||||||
const bounds = state.elements.video.duration;
|
const bounds = state.elements.video.duration;
|
||||||
if (bounds <= 0) return;
|
if (bounds <= 0) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user