fix: don't set zero dimensions on RNSVGGroup (#2612)

# Summary

Fixes #2610

It's more of a hack than the best fix for that; however, it's a
regression that we should address.

## Test Plan
Test case provided in #2610
This commit is contained in:
Jakub Grzywacz
2025-01-20 12:01:47 +01:00
committed by GitHub
parent 476df53618
commit f2ce29dabe

View File

@@ -8,14 +8,18 @@ RNSVGLayoutableShadowNode::RNSVGLayoutableShadowNode(
const ShadowNodeFamily::Shared &family,
ShadowNodeTraits traits)
: YogaLayoutableShadowNode(fragment, family, traits) {
if (std::strcmp(this->getComponentName(), "RNSVGGroup") != 0) {
setZeroDimensions();
}
}
RNSVGLayoutableShadowNode::RNSVGLayoutableShadowNode(
const ShadowNode &sourceShadowNode,
const ShadowNodeFragment &fragment)
: YogaLayoutableShadowNode(sourceShadowNode, fragment) {
if (std::strcmp(this->getComponentName(), "RNSVGGroup") != 0) {
setZeroDimensions();
}
}
void RNSVGLayoutableShadowNode::setZeroDimensions() {