mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
Merge pull request #2154 from pa1va/patch-2
fix: prevent TypeError when Bluetooth device name or icon are not strings
This commit is contained in:
@@ -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"];
|
||||
|
||||
Reference in New Issue
Block a user