diff --git a/src/pages/Playlist/index.tsx b/src/pages/Playlist/index.tsx index 67bc29c..f57060e 100644 --- a/src/pages/Playlist/index.tsx +++ b/src/pages/Playlist/index.tsx @@ -21,11 +21,14 @@ const PlaylistView: FC<{ container: RefObject }> = (props) => { const playlist = playlists.find((playlist) => playlist.name.toLowerCase() === playlistId); useEffect(() => { + if (!playlist) { + navigate('/404'); + } + dispatch(playlistActions.resetOrder({ order: playlist?.defaultFilter || '' })); - }, [dispatch, playlist]); + }, [dispatch, playlist, navigate]); if (!playlist) { - navigate('/404'); return null; }