diff --git a/ReactCommon/fabric/core/state/StateTarget.cpp b/ReactCommon/fabric/core/state/StateTarget.cpp index ad58e71773a2f8..1e132d6e5cd0ea 100644 --- a/ReactCommon/fabric/core/state/StateTarget.cpp +++ b/ReactCommon/fabric/core/state/StateTarget.cpp @@ -22,7 +22,7 @@ StateTarget::operator bool() const { const ShadowNode &StateTarget::getShadowNode() const { assert(shadowNode_ && "Stored pointer to a ShadowNode must not be null."); - return *std::static_pointer_cast(shadowNode_); + return *shadowNode_; } } // namespace react diff --git a/ReactCommon/fabric/core/state/StateTarget.h b/ReactCommon/fabric/core/state/StateTarget.h index de847e8ae64de5..31a0f53eb15b45 100644 --- a/ReactCommon/fabric/core/state/StateTarget.h +++ b/ReactCommon/fabric/core/state/StateTarget.h @@ -50,7 +50,7 @@ class StateTarget { const ShadowNode &getShadowNode() const; private: - std::shared_ptr shadowNode_; + std::shared_ptr shadowNode_; }; } // namespace react