Merge pull request #4660 from betagouv/fix-autocorrect-exception

sign_up: fix suggestions error when navigating away
This commit is contained in:
Paul Chavard 2019-12-19 18:30:48 +01:00 committed by GitHub
commit 71a3e464b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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 {

View file

@ -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