diff --git a/client/src/templates/Challenges/utils/frame.ts b/client/src/templates/Challenges/utils/frame.ts index 8c033266fc0..7fca7864602 100644 --- a/client/src/templates/Challenges/utils/frame.ts +++ b/client/src/templates/Challenges/utils/frame.ts @@ -120,7 +120,7 @@ const createHeader = (id = mainPreviewId) => ` document.addEventListener('submit', function(e) { const action = e.target.getAttribute('action'); e.preventDefault(); - if (action || action.match(/https?:\\/\\//)) { + if (action && action.match(/https?:\\/\\//)) { window.parent.window.alert( i18nContent.t('misc.iframe-form-submit-alert', { externalLink: action }) )