Skip to content

Commit

Permalink
🐛 (svelte) Use computed src value on iframe element
Browse files Browse the repository at this point in the history
  • Loading branch information
laymonage committed Feb 3, 2022
1 parent 3ed09b0 commit 87158f6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/svelte/lib/Giscus.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
onMount(() => {
if (!iframe) return
iframe = iframe as HTMLIFrameElement
iframe.src = src
iframe.addEventListener('load', () =>
iFrameResizer.iframeResizer(
{ checkOrigin: [GISCUS_ORIGIN] },
Expand All @@ -89,5 +88,5 @@
</script>

<div class="giscus">
<iframe title="Comments" class="giscus-frame" bind:this={iframe} />
<iframe title="Comments" class="giscus-frame" src={src} bind:this={iframe} />
</div>

0 comments on commit 87158f6

Please sign in to comment.