diff --git a/app/javascript/new_design/user-sign_up.js b/app/javascript/new_design/user-sign_up.js index c2a8c4d70..e3c1666b9 100644 --- a/app/javascript/new_design/user-sign_up.js +++ b/app/javascript/new_design/user-sign_up.js @@ -13,7 +13,7 @@ delegate('focusout', userNewEmailSelector, () => { const suggestedEmailSpan = document.querySelector(emailSuggestionSelector); const suggestion = suggest(userEmailInput.value); - if (suggestion && suggestion.full) { + if (suggestion && suggestion.full && suggestedEmailSpan) { suggestedEmailSpan.innerHTML = suggestion.full; show(document.querySelector(suggestionsSelector)); } else { diff --git a/app/views/users/registrations/new.html.haml b/app/views/users/registrations/new.html.haml index 37bcc2387..7a83cc034 100644 --- a/app/views/users/registrations/new.html.haml +++ b/app/views/users/registrations/new.html.haml @@ -8,7 +8,7 @@ = f.label :email, "Email" = f.text_field :email, autofocus: true, placeholder: "Votre adresse email" - .suspect-email + .suspect-email.hidden .email-suggestion-title Voulez-vous dire %span.email-suggestion-address blabla@gmail.com