Skip to content

Commit ed4ae18

Browse files
authored
Merge pull request #234 from Novactive/fix-captcha-multiple-rendering
fix: issue with captcha being added multiple time
2 parents 36db6e7 + ab62de3 commit ed4ae18

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

components/CaptchEtatBundle/src/bundle/Resources/public/js/captchetat-widget.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ const captchaEtat = (function () {
77
const widgets = container.querySelectorAll('.js-captcha-widget');
88

99
for (const widget of widgets) {
10+
if(widget.dataset.initialized === "true") {
11+
continue;
12+
}
13+
widget.dataset.initialized = "true"
1014
const htmlContainer = widget.querySelector('.captcha-html-container');
1115
const idInput = widget.querySelector('.captcha-input [name*="[captcha_id]"]')
1216
const captchaType = widget.dataset.type

0 commit comments

Comments
 (0)