diff --git a/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm b/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm index c9dc5f98d7a..0eda1bda5ea 100644 --- a/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +++ b/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm @@ -79,13 +79,12 @@ using namespace facebook::react; @"-[UIView(ComponentViewProtocol) updateLayoutMetrics:oldLayoutMetrics:]: Received invalid layout metrics (%@) for a view (%@).", NSStringFromCGRect(frame), self); - return; + } else { + // Note: Changing `frame` when `layer.transform` is not the `identity transform` is undefined behavior. + // Therefore, we must use `center` and `bounds`. + self.center = CGPoint{CGRectGetMidX(frame), CGRectGetMidY(frame)}; + self.bounds = CGRect{CGPointZero, frame.size}; } - - // Note: Changing `frame` when `layer.transform` is not the `identity transform` is undefined behavior. - // Therefore, we must use `center` and `bounds`. - self.center = CGPoint{CGRectGetMidX(frame), CGRectGetMidY(frame)}; - self.bounds = CGRect{CGPointZero, frame.size}; } if (forceUpdate || (layoutMetrics.layoutDirection != oldLayoutMetrics.layoutDirection)) {