Skip to content

Commit ab037b7

Browse files
crazy-geniusMinkin AlekseiFabianLars
authored
fix(nfc): remove extra lambda brackets (fix #3338) (#3339)
Co-authored-by: Minkin Aleksei <minkinaleksei@minkins-dev-center.local> Co-authored-by: Fabian-Lars <30730186+FabianLars@users.noreply.github.com>
1 parent 1198ad4 commit ab037b7

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

.changes/nfc-lambda.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
nfc: patch
3+
nfc-js: patch
4+
---
5+
6+
Fixed syntax error in kotlin files potentially causing issues when trying to write to tags when no prior session existed.

plugins/nfc/android/src/main/java/NfcPlugin.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,13 +355,13 @@ class NfcPlugin(private val activity: Activity) : Plugin(activity) {
355355
invoke.reject("connected tag not found, please wait for it to be available and then call write()")
356356
}
357357
} ?: run {
358-
args.kind?.let { kind -> {
358+
args.kind?.let { kind ->
359359
val filters = kind.filters()
360360
val techLists = kind.techLists()
361361
enableNFCInForeground(filters, techLists)
362362
session = Session(NfcAction.Write(message), invoke, true, null, filters, techLists)
363363
Logger.warn("NFC", "Write Mode Enabled")
364-
}} ?: run {
364+
} ?: run {
365365
invoke.reject("Missing `kind` for write")
366366
}
367367

0 commit comments

Comments
 (0)