mirror of
https://github.com/status-im/react-native.git
synced 2025-02-27 16:40:38 +00:00
Disallow mounting virtual nodes to Views
Summary: Virtual shadow nodes, such as RCTRawText, RCTTextInlineImage etc cannot be mounted to a View (ViewManager will throw an Exception if we ever try to). This diff is adding a check to make sure that Exception is never thrown. Reviewed By: ahmedre Differential Revision: D2800869
This commit is contained in:
parent
05544f6bca
commit
b10474c333
@ -254,6 +254,10 @@ import com.facebook.react.uimanager.ViewProps;
|
||||
}
|
||||
|
||||
/* package */ final void forceMountToView() {
|
||||
if (isVirtual()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (mDrawView == null) {
|
||||
mDrawView = DrawView.INSTANCE;
|
||||
if (getParent() != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user