Skip to content

Commit

Permalink
fix unloadFlow (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
alikirec authored Jul 16, 2024
1 parent ca86dc2 commit beab08b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/web-embed-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ const FormsortWebEmbed = (

const unloadFlow = () => {
removeListeners();
if (iframeEl.contentDocument) {
try {
rootEl.removeChild(iframeEl);
} catch (e) {
// noop: iframe already removed OR blur event triggered by iframe removal
}
};

Expand Down

0 comments on commit beab08b

Please sign in to comment.