forked from Shinonome/dots-hyprland
fix null not window error; don't add nulls when ternaries are wrong
This commit is contained in:
@@ -106,7 +106,7 @@ const BluetoothDevices = () => Widget.Box({
|
||||
tooltipText: device.name,
|
||||
children: [
|
||||
Widget.Icon(`${device.iconName}-symbolic`),
|
||||
(device.batteryPercentage ? Widget.Label({
|
||||
...(device.batteryPercentage ? [Widget.Label({
|
||||
className: 'txt-smallie',
|
||||
label: `${device.batteryPercentage}`,
|
||||
setup: (self) => {
|
||||
@@ -114,7 +114,7 @@ const BluetoothDevices = () => Widget.Box({
|
||||
self.label = `${device.batteryPercentage}`;
|
||||
}, 'notify::batteryPercentage')
|
||||
}
|
||||
}) : null),
|
||||
})] : []),
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user