Skip to content

Commit

Permalink
Add optional chaining for safety
Browse files Browse the repository at this point in the history
  • Loading branch information
MatiPl01 committed Aug 1, 2024
1 parent e7ba314 commit 963936f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-native-reanimated/src/reactUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function getCurrentReactOwner() {
React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED ||
// @ts-expect-error React secret internals aren't typed
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
return ReactSharedInternals.ReactCurrentOwner.current;
return ReactSharedInternals?.ReactCurrentOwner?.current;
}

export function isReactRendering() {
Expand Down

0 comments on commit 963936f

Please sign in to comment.