Skip to content

Commit

Permalink
fix: override fun onNewIntent not nullable param
Browse files Browse the repository at this point in the history
  • Loading branch information
lucashe1997 authored Dec 27, 2024
1 parent cf04d8b commit e1bb4ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugin/src/setKotlinMainActivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
Expand Down

0 comments on commit e1bb4ce

Please sign in to comment.