diff --git a/.changes/nfc-lambda.md b/.changes/nfc-lambda.md new file mode 100644 index 000000000..dc99eb8bd --- /dev/null +++ b/.changes/nfc-lambda.md @@ -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. diff --git a/plugins/nfc/android/src/main/java/NfcPlugin.kt b/plugins/nfc/android/src/main/java/NfcPlugin.kt index 4deaab440..04649b91f 100644 --- a/plugins/nfc/android/src/main/java/NfcPlugin.kt +++ b/plugins/nfc/android/src/main/java/NfcPlugin.kt @@ -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") }