Skip to content

Commit

Permalink
fix: when deleting a fallback URL the app crashed
Browse files Browse the repository at this point in the history
  • Loading branch information
bra-i-am committed Aug 29, 2024
1 parent ebccde0 commit d82a899
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const sourceHooks = ({ dispatch, previousVideoId, setAlert }) => ({
export const fallbackHooks = ({ fallbackVideos, dispatch }) => ({
addFallbackVideo: () => dispatch(actions.video.updateField({ fallbackVideos: [...fallbackVideos, ''] })),
deleteFallbackVideo: (videoUrl) => {
const updatedFallbackVideos = fallbackVideos.splice(fallbackVideos.indexOf(videoUrl), 1);
const updatedFallbackVideos = fallbackVideos.toSpliced(fallbackVideos.indexOf(videoUrl), 1);
dispatch(actions.video.updateField({ fallbackVideos: updatedFallbackVideos }));
},
});
Expand Down

0 comments on commit d82a899

Please sign in to comment.