Skip to content

Commit

Permalink
fix: only call onClose when passed via props (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinsandilya authored Oct 31, 2023
1 parent 9eb2fe9 commit 1bde68f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,9 @@ const createIntegrationBlock = function (self, integration) {
rootElement.firstChild.remove();
}
this.state = 'close';
this.#onClose();
if (this.#onClose) {
this.#onClose();
}
};

renderInitialStage = function (integrationId) {
Expand Down

1 comment on commit 1bde68f

@vercel
Copy link

@vercel vercel bot commented on 1bde68f Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

revert-client – ./

app.revert.dev
revert-client-git-main-revertdev.vercel.app
revert-client-revertdev.vercel.app

Please sign in to comment.