Fix Removing child elements causes crash

https://github.com/react-native-community/react-native-svg/issues/789
This commit is contained in:
Mikael Sand
2018-10-10 20:38:53 +03:00
parent 032541b2bf
commit b13e164e22
2 changed files with 5 additions and 7 deletions
@@ -52,13 +52,6 @@ public class SvgView extends ReactViewGroup implements ReactCompoundView {
super(reactContext);
}
@Override
public void addView(View child, int index, LayoutParams params) {
if (!(child instanceof RenderableView)) {
super.addView(child, index, params);
}
}
@Override
public void setId(int id) {
super.setId(id);
@@ -97,4 +97,9 @@ class SvgViewManager extends ReactViewManager {
mTagToShadowNode.remove(tag);
mTagToSvgView.remove(tag);
}
@Override
public boolean needsCustomLayoutForChildren() {
return true;
}
}