Skip to content

Commit

Permalink
fix(NOJIRA-123): Prevent loading live embed multiple times
Browse files Browse the repository at this point in the history
  • Loading branch information
mathio committed Nov 20, 2024
1 parent be89ed2 commit f17a5cb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/embed/src/initializers/initialize-live-embeds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ export const initializeLiveEmbeds = ({
throw new Error(`Invalid ${LIVE_EMBED_ATTRIBUTE}=${embedId} for embed #${index}`)
}

element.dataset.tfLoaded = 'true'
fetchLiveEmbed(embedId).then(({ html }) => {
element.innerHTML = html
element.dataset.tfLoaded = 'true'

onLiveEmbedLoad(element)
})
}
Expand Down

0 comments on commit f17a5cb

Please sign in to comment.