Skip to content

Commit

Permalink
fix: Embed - Do not reuse the modal on reopening it. (#17171)
Browse files Browse the repository at this point in the history
* chore: increase pagination managed users endpoint (#17147)

* Dont reuse the existing modal

---------

Co-authored-by: Morgan <33722304+ThyMinimalDev@users.noreply.github.com>
  • Loading branch information
hariombalhara and ThyMinimalDev authored Oct 18, 2024
1 parent d73d0eb commit 05c1ad8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/embeds/embed-core/src/embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,10 @@ class CalApi {
if (__prerender) {
this.preloadedModalUid = uid;
} else {
this.modalUid = uid;
// Intentionally not setting it to have the behaviour of reusing the same modal. Because it causes outdated content that might not be valid based on
// 1. The time difference b/w reopening(availability getting changed in b/w)
// 2. User using different query params but they not being used because of the same modal being reused. Happens in case of headless router being opened in embed
// this.modalUid = uid;
}

if (typeof config.iframeAttrs === "string" || config.iframeAttrs instanceof Array) {
Expand Down

0 comments on commit 05c1ad8

Please sign in to comment.