fix coderabbit issues

This commit is contained in:
Maze Winther
2026-02-27 20:34:33 +01:00
parent cb8f003478
commit 6226ceb052
3 changed files with 5 additions and 5 deletions
@@ -272,7 +272,7 @@ export class TimelineManager {
propertyPath, propertyPath,
time, time,
value, value,
interpolation = "linear", interpolation,
keyframeId, keyframeId,
}) => }) =>
new UpsertKeyframeCommand({ new UpsertKeyframeCommand({
+1 -1
View File
@@ -54,7 +54,7 @@ export function getKeyframeAtTime({
const channel = animations?.channels[propertyPath]; const channel = animations?.channels[propertyPath];
if (!channel || channel.keyframes.length === 0) return null; if (!channel || channel.keyframes.length === 0) return null;
const keyframe = channel.keyframes.find( const keyframe = channel.keyframes.find(
(kf) => Math.abs(kf.time - time) <= TIME_EPSILON_SECONDS, (keyframe) => Math.abs(keyframe.time - time) <= TIME_EPSILON_SECONDS,
); );
if (!keyframe) return null; if (!keyframe) return null;
return { return {
@@ -98,7 +98,7 @@ export class MoveElementCommand extends Command {
const isSameTrack = this.sourceTrackId === this.targetTrackId; const isSameTrack = this.sourceTrackId === this.targetTrackId;
let updatedTracks = tracksToUpdate.map((track) => { let updatedTracks = tracksToUpdate.map((track): TimelineTrack => {
if (isSameTrack && track.id === this.sourceTrackId) { if (isSameTrack && track.id === this.sourceTrackId) {
return { return {
...track, ...track,
@@ -124,8 +124,8 @@ export class MoveElementCommand extends Command {
}; };
} }
return track; return track;
}) as TimelineTrack[]; });
if (!isSameTrack) { if (!isSameTrack) {
const sourceTrackAfterMove = updatedTracks.find( const sourceTrackAfterMove = updatedTracks.find(