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>
This commit is contained in:
Minkin Aleksei
2026-03-10 10:55:47 +01:00
committed by GitHub
parent 1198ad4fb0
commit ab037b70d6
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -0,0 +1,6 @@
---
nfc: patch
nfc-js: patch
---
Fixed syntax error in kotlin files potentially causing issues when trying to write to tags when no prior session existed.
@@ -355,13 +355,13 @@ class NfcPlugin(private val activity: Activity) : Plugin(activity) {
invoke.reject("connected tag not found, please wait for it to be available and then call write()")
}
} ?: run {
args.kind?.let { kind -> {
args.kind?.let { kind ->
val filters = kind.filters()
val techLists = kind.techLists()
enableNFCInForeground(filters, techLists)
session = Session(NfcAction.Write(message), invoke, true, null, filters, techLists)
Logger.warn("NFC", "Write Mode Enabled")
}} ?: run {
} ?: run {
invoke.reject("Missing `kind` for write")
}