Skip to content

Commit

Permalink
Use goto over setting location
Browse files Browse the repository at this point in the history
Setting the location doesn't give svelte a chance to intercept the navigation and due to this, the whole page gets reloaded.
  • Loading branch information
Caleb-T-Owens committed Jan 24, 2025
1 parent c5877b5 commit 73babad
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
WebRoutesService,
type ProjectReviewCommitParameters
} from '@gitbutler/shared/routing/webRoutes.svelte';
import { goto } from '$app/navigation';
const BRANCH_TITLE_PLACE_HOLDER = 'No branch title provided';
const DESCRIPTION_PLACE_HOLDER = 'No description provided';
Expand Down Expand Up @@ -80,7 +81,7 @@
changeId
});
window.location.href = url;
goto(url);
}
</script>

Expand Down

0 comments on commit 73babad

Please sign in to comment.