Skip to content

Commit

Permalink
fix: no path
Browse files Browse the repository at this point in the history
  • Loading branch information
blushi committed Oct 19, 2024
1 parent 9523b5d commit 0e52d23
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const useNavigateToSlug = (slug?: string | null, path?: string) => {
useEffect(() => {
if (!!slug) {
const hash = location.hash || '';
navigate(`/project/${slug}${path}${hash}`, { replace: true });
navigate(`/project/${slug}${path || ''}${hash}`, { replace: true });
}
}, [slug, navigate, location.hash, path]);
};

0 comments on commit 0e52d23

Please sign in to comment.