Skip to content

Commit

Permalink
fix: added try catch block to getBool function call
Browse files Browse the repository at this point in the history
  • Loading branch information
mhochsto committed Feb 19, 2025
1 parent 59a09a7 commit 2cd4d8d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,12 @@ class AbrevvaBleModule(reactContext: ReactApplicationContext) :
}

val macFilter: String? = options.getString("macFilter")
val allowDuplicates: Boolean = options.getBoolean("allowDuplicates")

var allowDuplicates = false
try {
allowDuplicates = options.getBoolean("allowDuplicates")
} catch (_: Exception) {
}

this.manager.startScan(
{ device: BleDevice ->
reactApplicationContext.emitDeviceEvent("onScanResult", getBleDeviceData(device))
Expand Down

0 comments on commit 2cd4d8d

Please sign in to comment.