summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-01 12:38:16 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-05-01 12:38:16 +1000
commit84047718053f7426611ebaf0fb112b22f8b8373f (patch)
tree2dcfbd926838c0e517f1fd7518b7bb2b7559609a
parentbar: actually center panel workspaces (diff)
downloadcaelestia-shell-84047718053f7426611ebaf0fb112b22f8b8373f.tar.gz
caelestia-shell-84047718053f7426611ebaf0fb112b22f8b8373f.tar.bz2
caelestia-shell-84047718053f7426611ebaf0fb112b22f8b8373f.zip
bluetooth: fix undef errors
Filter devices to ensure they have props (idk why but sometimes they just dont have props)
-rw-r--r--services/Bluetooth.qml2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/Bluetooth.qml b/services/Bluetooth.qml
index 4092212..c7ed727 100644
--- a/services/Bluetooth.qml
+++ b/services/Bluetooth.qml
@@ -40,7 +40,7 @@ Singleton {
command: ["fish", "-c", `for a in (bluetoothctl devices | cut -d ' ' -f 2); bluetoothctl info $a | jq -R 'reduce (inputs / ":") as [$key, $value] ({}; .[$key | ltrimstr("\t")] = ($value | ltrimstr(" ")))' | jq -c --arg addr $a '.Address = $addr'; end | jq -sc`]
stdout: SplitParser {
onRead: data => {
- const devices = JSON.parse(data);
+ const devices = JSON.parse(data).filter(d => d.name);
const rDevices = root.devices;
const len = rDevices.length;