mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 03:56:03 +00:00
Add invariant for null root ids
Reviewed By: astreet Differential Revision: D2911414 fb-gh-sync-id: 7d7a4144765e093de18b442f7304693556fdfc2f
This commit is contained in:
parent
1cf605dda3
commit
6b63afb097
@ -19,6 +19,7 @@ var ReactMultiChild = require('ReactMultiChild');
|
||||
var UIManager = require('UIManager');
|
||||
|
||||
var deepFreezeAndThrowOnMutationInDev = require('deepFreezeAndThrowOnMutationInDev');
|
||||
var invariant = require('invariant');
|
||||
var warning = require('warning');
|
||||
|
||||
var registrationNames = ReactNativeEventEmitter.registrationNames;
|
||||
@ -189,10 +190,16 @@ ReactNativeBaseComponent.Mixin = {
|
||||
);
|
||||
|
||||
var nativeTopRootID = ReactNativeTagHandles.getNativeTopRootIDFromNodeID(rootID);
|
||||
if (nativeTopRootID == null) {
|
||||
invariant(
|
||||
false,
|
||||
'nativeTopRootID not found for tag ' + tag + ' view type ' +
|
||||
this.viewConfig.uiViewClassName + ' with rootID ' + rootID);
|
||||
}
|
||||
UIManager.createView(
|
||||
tag,
|
||||
this.viewConfig.uiViewClassName,
|
||||
nativeTopRootID ? ReactNativeTagHandles.rootNodeIDToTag[nativeTopRootID] : null,
|
||||
ReactNativeTagHandles.rootNodeIDToTag[nativeTopRootID],
|
||||
updatePayload
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user