fix: state waterfall

This commit is contained in:
Torsten Dittmann
2024-03-19 11:20:37 +02:00
parent 1c18570610
commit 71bb3fc7d4
+4 -3
View File
@@ -13,9 +13,10 @@ export const ssr = false;
export const load: LayoutLoad = async ({ depends, url }) => {
depends(Dependencies.ACCOUNT);
redirectTo.set(url.searchParams.get('forceRedirect') || null);
url.searchParams.delete('forceRedirect');
if (url.searchParams.has('forceRedirect')) {
redirectTo.set(url.searchParams.get('forceRedirect') || null);
url.searchParams.delete('forceRedirect');
}
try {
const account = await sdk.forConsole.account.get<{ organization?: string }>();