diff options
| author | Maze Winther <mazewinther@gmail.com> | 2026-04-26 03:06:13 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2026-04-26 03:06:13 +0200 |
| commit | e6c6193638e4247ff1e6f2df40de2a057112c773 (patch) | |
| tree | a467607adc00bb7eaa70c890a445712221fd1e58 /apps/web/src/timeline/hooks/use-timeline-playhead.ts | |
| parent | 685d9027409e7f19ee2dbd5fd91a0837c00eb60b (diff) | |
| download | opencut-e6c6193638e4247ff1e6f2df40de2a057112c773.tar.gz | |
fix: linter
Diffstat (limited to 'apps/web/src/timeline/hooks/use-timeline-playhead.ts')
| -rw-r--r-- | apps/web/src/timeline/hooks/use-timeline-playhead.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/web/src/timeline/hooks/use-timeline-playhead.ts b/apps/web/src/timeline/hooks/use-timeline-playhead.ts index 6fbf2147..0ec39f69 100644 --- a/apps/web/src/timeline/hooks/use-timeline-playhead.ts +++ b/apps/web/src/timeline/hooks/use-timeline-playhead.ts @@ -102,7 +102,7 @@ export function useTimelinePlayhead({ ) as MediaTime; const shouldSnap = snappingEnabled && !isShiftHeldRef.current; - const time = (() => { + const time: MediaTime = (() => { if (!shouldSnap) return frameTime; const tracks = editor.scenes.getActiveScene().tracks; const bookmarks = editor.scenes.getActiveScene()?.bookmarks ?? []; @@ -118,7 +118,9 @@ export function useTimelinePlayhead({ snapPoints, maxSnapDistance: getTimelineSnapThresholdInTicks({ zoomLevel }), }); - return snapResult.snapPoint ? snapResult.snappedTime : frameTime; + return snapResult.snapPoint + ? (snapResult.snappedTime as MediaTime) + : frameTime; })(); scrubTimeRef.current = time; |
