From 07febee992a38535d83f7aae36882b627a347317 Mon Sep 17 00:00:00 2001 From: Cole Lawrence Date: Mon, 30 May 2022 08:40:59 -0400 Subject: [PATCH] fix: useLockFrameStampPosition not enough deps Co-authored-by: Andrew Prifer <2991360+AndrewPrifer@users.noreply.github.com> --- .../panels/SequenceEditorPanel/FrameStampPositionProvider.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/theatre/studio/src/panels/SequenceEditorPanel/FrameStampPositionProvider.tsx b/theatre/studio/src/panels/SequenceEditorPanel/FrameStampPositionProvider.tsx index 9100d36..5a012f9 100644 --- a/theatre/studio/src/panels/SequenceEditorPanel/FrameStampPositionProvider.tsx +++ b/theatre/studio/src/panels/SequenceEditorPanel/FrameStampPositionProvider.tsx @@ -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]) } /**