mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix crash "lateinit property initialProps has not been initialized" (#39632)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
030663bb06
commit
188eceec98
+2
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user