mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Check if result from native UIManager is null before accessing view config
Summary: As titled - attempt to mitigate a JS error on iOS while we work on getting JS view configs. It seems like this happens when the bridge is invalid. Changelog: [Fixed][iOS] Don't throw an error if the UIManager returns null when fetching a view config Reviewed By: kacieb Differential Revision: D25247203 fbshipit-source-id: e2003f99b818f9657c60ff95b266be74fe18a94b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ae6f4f308e
commit
d435d26d87
@@ -71,7 +71,7 @@ const UIManagerJS = {
|
||||
) {
|
||||
const result = NativeUIManager.lazilyLoadView(viewManagerName);
|
||||
triedLoadingConfig.add(viewManagerName);
|
||||
if (result.viewConfig) {
|
||||
if (result != null && result.viewConfig != null) {
|
||||
getConstants()[viewManagerName] = result.viewConfig;
|
||||
lazifyViewManagerConfig(viewManagerName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user