diff --git a/packages/fakeyou.com/src/components/common/VideoPlayerQuickTrim/components/ScrubberBar/TrimScrubber.tsx b/packages/fakeyou.com/src/components/common/VideoPlayerQuickTrim/components/ScrubberBar/TrimScrubber.tsx index a79ef3f2f6..579aa3fb7c 100644 --- a/packages/fakeyou.com/src/components/common/VideoPlayerQuickTrim/components/ScrubberBar/TrimScrubber.tsx +++ b/packages/fakeyou.com/src/components/common/VideoPlayerQuickTrim/components/ScrubberBar/TrimScrubber.tsx @@ -43,11 +43,12 @@ export const TrimScrubber = ({ useEffect(()=>{ if (trimValues !== null){ const newWidth = calcScrubberWidth(); - if (newWidth !== scrubberWidth){ - setScrubberWidth(newWidth); - } + setScrubberWidth((currWidth)=>{ + if (newWidth !== currWidth) return newWidth; + else return currWidth; + }); } - },[trimValues]); + },[trimValues, calcScrubberWidth]);