Skip to content

Commit

Permalink
🚑 (svelte) Use onMount for determining session
Browse files Browse the repository at this point in the history
  • Loading branch information
laymonage committed Aug 1, 2021
1 parent be90095 commit 10cf56e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/svelte/lib/Giscus.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
session
})
$: {
onMount(() => {
const origin = location.href
const url = new URL(origin)
const savedSession = localStorage.getItem(GISCUS_SESSION_KEY)
Expand All @@ -55,7 +55,7 @@
console.warn(`${formatError(e?.message)} Session has been cleared.`)
}
}
}
})
onMount(addDefaultStyles)
Expand Down

0 comments on commit 10cf56e

Please sign in to comment.