mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-04 23:54:53 +00:00
Fix Removing child elements causes crash
https://github.com/react-native-community/react-native-svg/issues/789
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user