From cf4f6b70a5c8e97631865968eb04119f8f8948fd Mon Sep 17 00:00:00 2001 From: pa1va Date: Wed, 11 Mar 2026 12:09:05 -0300 Subject: [PATCH] fix: prevent TypeError when Bluetooth device name or icon are not strings --- Helpers/BluetoothUtils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Helpers/BluetoothUtils.js b/Helpers/BluetoothUtils.js index e158bfbd5..879b275c7 100644 --- a/Helpers/BluetoothUtils.js +++ b/Helpers/BluetoothUtils.js @@ -85,8 +85,8 @@ var signalIcon = (p) => { // Icon mapping var deviceIcon = (name, icon) => { - var s1 = (name || "").toLowerCase(); - var s2 = (icon || "").toLowerCase(); + var s1 = String(name || "").toLowerCase(); + var s2 = String(icon || "").toLowerCase(); // Prefer icon-based hints for display devices first to avoid "audio" catching TVs var displayHints = ["display", "tv", "monitor", "projector", "screen", "chromecast", "cast"];