From f47078eeacd94e5b984e4add8d7f8874fb88b9af Mon Sep 17 00:00:00 2001 From: Jacob Willden <67853915+jacob-willden@users.noreply.github.com> Date: Fri, 6 Dec 2024 15:12:42 -0700 Subject: [PATCH] Fix subtitlesMenu reassignment --- .../adding_captions_and_subtitles_to_html5_video/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/media/audio_and_video_delivery/adding_captions_and_subtitles_to_html5_video/index.md b/files/en-us/web/media/audio_and_video_delivery/adding_captions_and_subtitles_to_html5_video/index.md index 01de51f52a17722..fa8195f5583298b 100644 --- a/files/en-us/web/media/audio_and_video_delivery/adding_captions_and_subtitles_to_html5_video/index.md +++ b/files/en-us/web/media/audio_and_video_delivery/adding_captions_and_subtitles_to_html5_video/index.md @@ -156,7 +156,7 @@ All we need to do is to go through the video's `textTracks`, reading their prope let subtitlesMenu; if (video.textTracks) { const df = document.createDocumentFragment(); - const subtitlesMenu = df.appendChild(document.createElement("ul")); + subtitlesMenu = df.appendChild(document.createElement("ul")); subtitlesMenu.className = "subtitles-menu"; subtitlesMenu.appendChild(createMenuItem("subtitles-off", "", "Off")); for (let i = 0; i < video.textTracks.length; i++) {