Skip to content

Commit

Permalink
fix: remove unused window check, as onMount only runs client side
Browse files Browse the repository at this point in the history
  • Loading branch information
schuwa authored and stepan662 committed Nov 13, 2023
1 parent 1dd569e commit 95d4b43
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions packages/svelte/src/lib/TolgeeProvider.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@
tolgee,
} as TolgeeSvelteContext);
if (typeof window !== 'undefined') {
onMount(() => {
tolgee.run().finally(() => {
isLoading = false
})
});
onDestroy(tolgee.stop);
}
onMount(() => {
tolgee.run().finally(() => {
isLoading = false
})
});
onDestroy(tolgee.stop);
</script>

{#if !isLoading }
Expand Down

0 comments on commit 95d4b43

Please sign in to comment.