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++) {