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

View File

@ -272,7 +272,7 @@ export class TimelineManager {
propertyPath,
time,
value,
interpolation = "linear",
interpolation,
keyframeId,
}) =>
new UpsertKeyframeCommand({

View File

@ -54,7 +54,7 @@ export function getKeyframeAtTime({
const channel = animations?.channels[propertyPath];
if (!channel || channel.keyframes.length === 0) return null;
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;
return {

View File

@ -98,7 +98,7 @@ export class MoveElementCommand extends Command {
const isSameTrack = this.sourceTrackId === this.targetTrackId;
let updatedTracks = tracksToUpdate.map((track) => {
let updatedTracks = tracksToUpdate.map((track): TimelineTrack => {
if (isSameTrack && track.id === this.sourceTrackId) {
return {
...track,
@ -124,8 +124,8 @@ export class MoveElementCommand extends Command {
};
}
return track;
}) as TimelineTrack[];
return track;
});
if (!isSameTrack) {
const sourceTrackAfterMove = updatedTracks.find(