Skip to content

Commit 3547760

Browse files
committed
ios: don't decode product info if empty
Will generate a needless decoding error. The product value is empty if not read yet or if the device is not in bootloader/firmware state.
1 parent fc2a1bd commit 3547760

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

frontends/ios/BitBoxApp/BitBoxApp/Bluetooth.swift

+4
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,10 @@ class BluetoothManager: NSObject, ObservableObject, CBCentralManagerDelegate, CB
297297
let value = pProduct.value else {
298298
return nil
299299
}
300+
301+
if value.isEmpty {
302+
return nil
303+
}
300304

301305
do {
302306
let decoder = JSONDecoder()

0 commit comments

Comments
 (0)