refactor: use replaceChildren instead of innerHTML assignment

This commit is contained in:
2026-06-21 01:12:03 +02:00
committed by Milas Holsting
parent 77b9802751
commit 4835cf9835

View File

@@ -56,7 +56,7 @@ export const resolveActiveSegments = (): void => {
export const renderSegments = (): void => {
const track = state.elements.container.querySelector("[data-segments]") as HTMLElement | null;
if (!track) return;
track.innerHTML = "";
track.replaceChildren();
const bounds = state.elements.video.duration;
if (bounds <= 0) return;