Apply suggestion from @Copilot

We check for the file's existence, and if it does, we set AUDIO_MOTION_ENABLED = true.
Okay, let's do an additional check in case the import fails for some reason.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
IgorA100
2026-04-29 17:27:12 +03:00
committed by GitHub
parent 518ba21251
commit f9df56c43f

View File

@@ -22,6 +22,9 @@ if (checkAudioMotionEnabled()) {
if (currentView == 'watch' || currentView == 'montage' || currentView == 'event') {
customElements.define('audio-motion', _AudioMotionAnalyzer);
}
}).catch(error => {
console.error('Failed to load audioMotion-analyzer module:', error);
window.CURRENT_AUDIO_MOTION_ANALYZER_VERSION = "LoadFailed";
});
} else {
window.CURRENT_AUDIO_MOTION_ANALYZER_VERSION = "NotInstalled";