Skip to content

Commit

Permalink
Fix scrollTo on Fabric (#4378)
Browse files Browse the repository at this point in the history
## Summary

The flag `_IS_FABRIC` is only defined on React Runtime, we can't use
them on Reanimated Runtime. I removed the check of this flag for
Reanimated Runtime because this one prevents any `_dispatchCommand`
call.

## Test plan

Run any scrollTo example on Fabric
  • Loading branch information
piaskowyk authored Apr 20, 2023
1 parent 83ba649 commit 87fb9c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reanimated2/NativeMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function dispatchCommand(
args: Array<unknown>
): void {
'worklet';
if (!_WORKLET || !isNative || !global._IS_FABRIC) {
if (!_WORKLET || !isNative) {
return;
}

Expand Down

0 comments on commit 87fb9c6

Please sign in to comment.