From d25ffdb29276b94173fd162653a8379692767c39 Mon Sep 17 00:00:00 2001
From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
Date: Fri, 29 Nov 2024 20:44:42 -0600
Subject: [PATCH] Fix crash when consecutive underscores are used in camera
 name (#15257)

---
 web/src/pages/Live.tsx | 1 +
 1 file changed, 1 insertion(+)

diff --git a/web/src/pages/Live.tsx b/web/src/pages/Live.tsx
index e19dccd07..97e565ef1 100644
--- a/web/src/pages/Live.tsx
+++ b/web/src/pages/Live.tsx
@@ -62,6 +62,7 @@ function Live() {
     if (selectedCameraName) {
       const capitalized = selectedCameraName
         .split("_")
+        .filter((text) => text)
         .map((text) => text[0].toUpperCase() + text.substring(1));
       document.title = `${capitalized.join(" ")} - Live - Frigate`;
     } else if (cameraGroup && cameraGroup != "default") {