Skip to content

Commit

Permalink
Fix crash "lateinit property initialProps has not been initialized"
Browse files Browse the repository at this point in the history
Summary:
Found a new [crash](P837035842) caused by converting RNTesterActivity to kotlin in D49506304

Changelog:
[Android][Changed] - fix crash "lateinit property initialProps has not been initialized"

Reviewed By: cortinico

Differential Revision: D49594073
  • Loading branch information
luluwu2032 authored and facebook-github-bot committed Sep 25, 2023
1 parent 030663b commit d72e01d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class RNTesterActivity : ReactActivity() {
super.onCreate(savedInstanceState)
}

override fun getLaunchOptions() = initialProps
override fun getLaunchOptions() =
if (this::initialProps.isInitialized) initialProps else Bundle()
}

override fun createReactActivityDelegate() = RNTesterActivityDelegate(this, mainComponentName)
Expand Down

0 comments on commit d72e01d

Please sign in to comment.