Skip to content

Commit

Permalink
fix: resetting widgets solved ref back to false on widget unmount
Browse files Browse the repository at this point in the history
  • Loading branch information
kkatsi committed Jul 8, 2024
1 parent b92a9ff commit 77f3686
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/lib/src/lib.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ export const Turnstile = forwardRef<TurnstileInstance | undefined, TurnstileProp

return () => {
cancelled = true
if (widgetId.current) window.turnstile!.remove(widgetId.current)
if (widgetId.current) {
window.turnstile!.remove(widgetId.current)
widgetSolved.current = false
}
}
},
[containerId, turnstileLoaded, renderConfig]
Expand Down

0 comments on commit 77f3686

Please sign in to comment.