Skip to content

Commit 8d88123

Browse files
authored
Merge pull request #219 from edubadges/feature/ewi-fix-counts
fix: Correct redirect path handling to fix count queries
2 parents c0955ee + 8808e51 commit 8d88123

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/routes/Login.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
notificationEn, notificationNl, displayStart, displayEnd, notificationType
2929
}
3030
}`);
31-
31+
3232
return {
3333
badgeInstancesCount: res.badgeInstancesCount,
3434
badgeClassesCount: res.badgeClassesCount,
@@ -40,9 +40,9 @@
4040
onMount(() => {
4141
const urlSearchParams = new URLSearchParams(window.location.search);
4242
forceLogin = urlSearchParams.has("force");
43-
const currentRedirectPath = get(redirectPath);
43+
const currentRedirectPath = urlSearchParams.get("redirectPath") || "";
4444
validateName = (urlSearchParams.get("validateName") === "true" || currentRedirectPath.includes("direct-awards"));
45-
45+
4646
if ($userRole && $userLoggedIn) {
4747
navigate($redirectPath || "/");
4848
$redirectPath = "";
@@ -233,4 +233,4 @@
233233
</div>
234234
</div>
235235
</div>
236-
</div>
236+
</div>

0 commit comments

Comments
 (0)