fix: useLockFrameStampPosition not enough deps
Co-authored-by: Andrew Prifer <2991360+AndrewPrifer@users.noreply.github.com>
This commit is contained in:
parent
adc712c205
commit
07febee992
1 changed files with 2 additions and 2 deletions
|
@ -134,13 +134,13 @@ export const useLockFrameStampPosition = (shouldLock: boolean, val: number) => {
|
|||
return () => {
|
||||
lockRef.current!.unlock()
|
||||
}
|
||||
}, [shouldLock])
|
||||
}, [shouldLock, getLock])
|
||||
|
||||
useLayoutEffect(() => {
|
||||
if (shouldLock) {
|
||||
lockRef.current!.set(val)
|
||||
}
|
||||
}, [val])
|
||||
}, [val, shouldLock])
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue