Skip to content

Commit 86c6e9c

Browse files
committed
Prevent nil sensors from being advertised
1 parent 373aad2 commit 86c6e9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

peripheral/sensor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type Sensors []*Sensor
1414

1515
// UUIDs of sensors in a Set
1616
func (s Sensors) UUIDs() []ble.UUID {
17-
out := make([]ble.UUID, len(s))
17+
out := make([]ble.UUID, 0, len(s))
1818
for _, s := range s {
1919
out = append(out, s.UUID)
2020
}

0 commit comments

Comments
 (0)