Skip to content

Commit 393b377

Browse files
committed
Simplify iOS
1 parent 72e78cf commit 393b377

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

apple/RNGestureHandlerModule.mm

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,14 @@ void decorateRuntime(jsi::Runtime &runtime)
104104
return jsi::Value::null();
105105
}
106106
auto shadowNode = shadowNodeFromValue(runtime, arguments[0]);
107-
bool isFormsStackingContext = shadowNode->getTraits().check(ShadowNodeTraits::FormsStackingContext);
108-
109-
bool isTextComponent = false;
110107

111-
if (auto v = dynamic_pointer_cast<const ParagraphShadowNode>(shadowNode); v != nullptr) {
112-
isTextComponent = true;
108+
if (dynamic_pointer_cast<const TextShadowNode>(shadowNode)) {
109+
return jsi::Value(true);
113110
}
114111

115-
if (auto v = dynamic_pointer_cast<const TextShadowNode>(shadowNode); v != nullptr) {
116-
isTextComponent = true;
117-
}
112+
bool isFormsStackingContext = shadowNode->getTraits().check(ShadowNodeTraits::FormsStackingContext);
118113

119-
return jsi::Value(isFormsStackingContext || isTextComponent);
114+
return jsi::Value(isFormsStackingContext);
120115
});
121116
runtime.global().setProperty(runtime, "isFormsStackingContext", std::move(isFormsStackingContext));
122117
}

0 commit comments

Comments
 (0)