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:
Denis Koroskin 2016-01-05 12:58:45 -08:00 committed by Ahmed El-Helw
parent 05544f6bca
commit b10474c333

View File

@ -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) {