Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash à la création des liens d'en-tête #890

Closed
Lukotharses opened this issue Feb 26, 2024 · 1 comment · Fixed by #893
Closed

crash à la création des liens d'en-tête #890

Lukotharses opened this issue Feb 26, 2024 · 1 comment · Fixed by #893
Assignees
Milestone

Comments

@Lukotharses
Copy link

Lukotharses commented Feb 26, 2024

Décrire le bug

À l’initialisation du dsfr, le js crash sur la création des liens header.
Il n'y a pas de lien rapide en header mais un lien de changement de thème et la barre de navigation.

Les étapes pour reproduire le bug

    <div class="fr-container">
      <button class="fr-btn--close fr-btn" aria-controls="modal-491" title="Fermer" data-fr-js-modal-button="true">
        Fermer
      </button>
      <div class="fr-header__menu-links">
        <ul></ul>
      </div>
      <nav class="fr-nav" id="navigation-494" role="navigation" aria-label="Menu principal" data-fr-js-navigation="true">
        <ul class="fr-nav__list">
            <li class="fr-nav__item">
                <a class="fr-nav__link" href="/lien1" > Lien 1 </a>
            </li>
            <li class="fr-nav__item">
              <a class="fr-nav__link" href="/lien2" > Lien 2 </a>
            </li>
        </ul>
      </nav>
    </div>
  </div>

sortie console
Uncaught TypeError: n is null
init header-links.js:29
_config instance.js:45
create element.js:62
populate element.js:51
parse stage.js:131
introduce registration.js:39
activate register.js:18
set isActive state.js:35
start engine.js:35
debugger eval code:1

En debugger, la variable toolsHtmlIdList est null.

Comportement attendu

Ignorer les éléments sans id

Configuration et système utilisé

  • **Version du DSFR : 1.11.1

Informations complémentaires

message posté en commentaire du dernier commit

@lab9fr lab9fr self-assigned this Feb 27, 2024
@lab9fr lab9fr added this to the 1.11.2 milestone Feb 27, 2024
@lab9fr lab9fr linked a pull request Feb 27, 2024 that will close this issue
keryanS pushed a commit that referenced this issue Mar 1, 2024
- corrige l'issue #890, la valeur null renvoyée par la fonction match est remplacée par un array vide pour permettre son itération
@keryanS
Copy link
Contributor

keryanS commented Jul 9, 2024

La v1.11.2 semble corrigé ce problème.

@keryanS keryanS closed this as completed Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants