Skip to content

Commit

Permalink
fix: don't set zero dimensions on RNSVGGroup (#2612)
Browse files Browse the repository at this point in the history
# 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
  • Loading branch information
jakex7 authored Jan 20, 2025
1 parent 476df53 commit f2ce29d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@ RNSVGLayoutableShadowNode::RNSVGLayoutableShadowNode(
const ShadowNodeFamily::Shared &family,
ShadowNodeTraits traits)
: YogaLayoutableShadowNode(fragment, family, traits) {
setZeroDimensions();
if (std::strcmp(this->getComponentName(), "RNSVGGroup") != 0) {
setZeroDimensions();
}
}

RNSVGLayoutableShadowNode::RNSVGLayoutableShadowNode(
const ShadowNode &sourceShadowNode,
const ShadowNodeFragment &fragment)
: YogaLayoutableShadowNode(sourceShadowNode, fragment) {
setZeroDimensions();
if (std::strcmp(this->getComponentName(), "RNSVGGroup") != 0) {
setZeroDimensions();
}
}

void RNSVGLayoutableShadowNode::setZeroDimensions() {
Expand Down

0 comments on commit f2ce29d

Please sign in to comment.