fix: redirect to updated instance url on save (#803)

This commit is contained in:
Yaros
2026-09-10 16:08:04 -04:00
committed by GitHub
parent a45fabbcda
commit 488e587c22
@@ -1,5 +1,5 @@
<script lang="ts">
import { StorageKey } from '$lib';
import { mergeInstanceUrl, StorageKey } from '$lib';
import FullPageLayout from '$common/components/FullPageLayout.svelte';
import {
Button,
@@ -41,7 +41,9 @@
localStorage.setItem(StorageKey.INSTANCE_URL, instanceUrl);
if (targetUrl && instanceUrl) {
location.assign(new URL(targetUrl, instanceUrl).href);
const currentUrl = new URL(location.href);
currentUrl.searchParams.delete('instanceUrl');
location.assign(mergeInstanceUrl(currentUrl, instanceUrl).href);
} else {
saved = true;
}