Skip to content

Commit

Permalink
Fix splicing
Browse files Browse the repository at this point in the history
  • Loading branch information
charlielee committed Oct 23, 2024
1 parent fc73513 commit 17c9b26
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const AnimationToolbar = (): JSX.Element => {
if (trackItem === undefined) {
return;
}
stopPlayback();
await deleteTrackItem?.(trackItem.id);
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/redux/slices/projectSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const projectSlice = createSlice({
if (index === undefined) {
throw `Unable to find frame track item to remove with id ${action.payload}`;
}
state.take?.frameTrack.trackItems.splice(index);
state.take?.frameTrack.trackItems.splice(index, 1);
},

setPlaybackSpeed: (state, action: PayloadAction<number>) => {
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/services/fileManager/FileManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class FileManager {
URL.revokeObjectURL(fileInfo.objectURL);

const index = this.fileInfos.findIndex((f) => f.fileInfoId === fileInfoId);
this.fileInfos.splice(index);
this.fileInfos.splice(index, 1);
};

private writeFileAndCreateObjectURL = async (
Expand Down

0 comments on commit 17c9b26

Please sign in to comment.