From 3fc072c6ff01abbeb54709bd03a00a925b437b16 Mon Sep 17 00:00:00 2001 From: Thomas Skerbis Date: Fri, 27 Sep 2024 15:37:17 +0200 Subject: [PATCH] Update assets/vidstack_helper.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- assets/vidstack_helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/vidstack_helper.js b/assets/vidstack_helper.js index bc991bf..daea967 100644 --- a/assets/vidstack_helper.js +++ b/assets/vidstack_helper.js @@ -143,7 +143,7 @@ document.addEventListener('DOMContentLoaded', function() { const videoLayouts = document.querySelectorAll('media-video-layout'); videoLayouts.forEach(layout => { const player = layout.closest('media-player'); - const lang = player ? (player.getAttribute('lang') || 'en') : 'en'; + const lang = player?.getAttribute('lang') || 'en'; layout.translations = translations[lang] || translations['en']; });