1 parent 695b6dd commit 940b9dfCopy full SHA for 940b9df
1 file changed
src/routes/+page.svelte
@@ -200,9 +200,13 @@
200
}
201
try {
202
const parsed = parseRepoUrl(repo)
203
+ const targetPath = `${resolve('/')}${parsed.host}/${parsed.owner}/${parsed.repo}`
204
+ // Push a new history entry when navigating to a different repo,
205
+ // but replace when confirming the current URL (initial load, back button)
206
+ const isSamePath = page.url.pathname === targetPath
207
// eslint-disable-next-line svelte/no-navigation-without-resolve -- resolve('/') is embedded in template
- goto(`${resolve('/')}${parsed.host}/${parsed.owner}/${parsed.repo}`, {
- replaceState: true,
208
+ goto(targetPath, {
209
+ replaceState: isSamePath,
210
keepFocus: true,
211
})
212
} catch {
0 commit comments