Skip to content

Commit

Permalink
Fix crash "lateinit property initialProps has not been initialized" (f…
Browse files Browse the repository at this point in the history
…acebook#39632)

Summary:
Pull Request resolved: facebook#39632

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

fbshipit-source-id: e6d086f6e9bc64b449e6a3da4bc1903729970e7d
  • Loading branch information
Lulu Wu authored and ShevO27 committed Sep 26, 2023
1 parent 171c65d commit f49b379
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 f49b379

Please sign in to comment.