mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-06 00:12:21 +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);
|
super(reactContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addView(View child, int index, LayoutParams params) {
|
|
||||||
if (!(child instanceof RenderableView)) {
|
|
||||||
super.addView(child, index, params);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setId(int id) {
|
public void setId(int id) {
|
||||||
super.setId(id);
|
super.setId(id);
|
||||||
|
|||||||
@@ -97,4 +97,9 @@ class SvgViewManager extends ReactViewManager {
|
|||||||
mTagToShadowNode.remove(tag);
|
mTagToShadowNode.remove(tag);
|
||||||
mTagToSvgView.remove(tag);
|
mTagToSvgView.remove(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean needsCustomLayoutForChildren() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user