diff --git a/packages/react-native-reanimated/src/platform-specific/findHostInstance.ts b/packages/react-native-reanimated/src/platform-specific/findHostInstance.ts index b61cb93b6b0..59c40f0d44f 100644 --- a/packages/react-native-reanimated/src/platform-specific/findHostInstance.ts +++ b/packages/react-native-reanimated/src/platform-specific/findHostInstance.ts @@ -18,7 +18,10 @@ type HostInstancePaper = { export type HostInstance = HostInstanceFabric & HostInstancePaper; -function findHostInstanceFastPath(maybeNativeRef: HostInstance) { +function findHostInstanceFastPath(maybeNativeRef: HostInstance | undefined) { + if (!maybeNativeRef) { + return undefined; + } if ( maybeNativeRef.__internalInstanceHandle && maybeNativeRef.__nativeTag &&