Fix bug in ReadOnlyNode.compareDocumentPosition (#47557)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47557

Changelog: [internal]

Not published as a bugfix because this API isn't enabled in OSS yet.

Reviewed By: sammy-SC

Differential Revision: D65769326

fbshipit-source-id: 165d58304d8214c583fbc162d8888095e9f068aa
This commit is contained in:
Rubén Norte 2024-11-15 03:00:17 -08:00 committed by Facebook GitHub Bot
parent 058624fc1d
commit 4cce3b8bf6

View File

@ -211,7 +211,7 @@ uint_fast16_t compareDocumentPosition(
auto otherAncestors =
otherShadowNode.getFamily().getAncestors(*currentRevision);
if (ancestors.empty()) {
if (otherAncestors.empty()) {
return DOCUMENT_POSITION_DISCONNECTED;
}