From e1bb4cef44a1d4f67eab30318f5d24e5249c8181 Mon Sep 17 00:00:00 2001 From: lucashe1997 Date: Fri, 27 Dec 2024 15:25:48 -0300 Subject: [PATCH] fix: override fun onNewIntent not nullable param --- plugin/src/setKotlinMainActivity.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugin/src/setKotlinMainActivity.ts b/plugin/src/setKotlinMainActivity.ts index 98687872..513521ba 100644 --- a/plugin/src/setKotlinMainActivity.ts +++ b/plugin/src/setKotlinMainActivity.ts @@ -11,18 +11,18 @@ export function setKotlinMainActivity(contents: string): string { ); // on NewIntent - if (contents.includes('override fun onNewIntent(intent: Intent?) {')) { + if (contents.includes('override fun onNewIntent(intent: Intent) {')) { contents = contents.replace( 'super.onNewIntent(intent)\n', - 'super.onNewIntent(intent)\n intent?.let { AdyenCheckout.handleIntent(it) }\n' + 'super.onNewIntent(intent)\n AdyenCheckout.handleIntent(intent)\n' ); } else { contents = contents.replace( /}\n$/, '\n' + - ' override fun onNewIntent(intent: Intent?) {\n' + + ' override fun onNewIntent(intent: Intent) {\n' + ' super.onNewIntent(intent)\n' + - ' intent?.let { AdyenCheckout.handleIntent(it) }\n' + + ' AdyenCheckout.handleIntent(intent)\n' + ' }\n' + '}\n' );