We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de56751 commit 6cb2277Copy full SHA for 6cb2277
.changeset/poor-chicken-occur.md
@@ -0,0 +1,5 @@
1
+---
2
+'@clerk/clerk-js': patch
3
4
+
5
+Added proper type checking before using the in operator to prevent errors when modal state contains non-object values
packages/clerk-js/src/ui/Components.tsx
@@ -326,7 +326,7 @@ const Components = (props: ComponentsProps) => {
326
setState(s => {
327
function handleCloseModalForExperimentalUserVerification() {
328
const modal = s[`${name}Modal`] || {};
329
- if ('afterVerificationCancelled' in modal && notify) {
+ if (modal && typeof modal === 'object' && 'afterVerificationCancelled' in modal && notify) {
330
modal.afterVerificationCancelled?.();
331
}
332
0 commit comments