Skip to content

Commit

Permalink
fix: handle case when battery is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
rubiin committed Oct 22, 2024
1 parent a8a779e commit b7ed03b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/menus/bluetooth/devices/devicelist.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const devices = (bluetooth: Bluetooth, self: Box<Gtk.Widget, unknown>): Box<Chil
}),
Widget.Label({
class_name: 'connection-status battery',
label: device.connected
label: device.connected && device.battery_percentage !== null

Check failure on line 114 in modules/menus/bluetooth/devices/devicelist.ts

View workflow job for this annotation

GitHub Actions / code_quality

Replace `·device.connected·&&` with `⏎········································································device.connected·&&⏎·······································································`
? `| 󰥉 ${device.battery_percentage}%`

Check failure on line 115 in modules/menus/bluetooth/devices/devicelist.ts

View workflow job for this annotation

GitHub Actions / code_quality

Insert `····`
: '',

Check failure on line 116 in modules/menus/bluetooth/devices/devicelist.ts

View workflow job for this annotation

GitHub Actions / code_quality

Insert `····`
}),
Expand Down

0 comments on commit b7ed03b

Please sign in to comment.