Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useAnimatedSensor | TypeError: Cannot assign to read-only property 'sensor' fixed. #5537

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update useAnimatedSensor.ts
  • Loading branch information
talut authored Jan 2, 2024
commit 3d957b848e898db40f677b0c9d2209efed24d3ab
2 changes: 1 addition & 1 deletion src/reanimated2/hook/useAnimatedSensor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export function useAnimatedSensor(

ref.current = {
sensor: newSensor,
unregister: id !== -1 ? () => unregisterSensor(id) : () => {
unregister: id !== -1 ? () => unregisterSensor(id) : () => {
// NOOP
},
isAvailable: id !== -1,
Expand Down