Skip to content

🐛 fix(core): corrige la suppression d'Ă©missions - #1536

Open
keryanS wants to merge 1 commit into
mainfrom
fix/emitter
Open

keryanS wants to merge 1 commit into
mainfrom
fix/emitter

Conversation

@keryanS

@keryanS keryanS commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

@keryanS keryanS added this to the 1.15.4 milestone Sep 24, 2026
@keryanS
keryanS requested a lite review from Copilot September 24, 2026 15:09
@keryanS keryanS self-assigned this Sep 24, 2026
@keryanS keryanS added the correctif Quelque chose ne fonctionne pas label Sep 24, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟱 Approval recommended

Le changement est minimal, ciblé et corrige directement la cause racine (utilisation incorrecte de splice) sans impact fonctionnel négatif attendu.

Review effort: Lite
Findings: None

What changed in this PR

Corrige un bug dans l’utilitaire Emitter du cƓur DSFR oĂč remove(type, closure) supprimait involontairement tous les Ă©couteurs enregistrĂ©s aprĂšs celui retirĂ©, Ă  cause d’un splice(index) sans deleteCount.

Changes:

  • Remplace splice(index) par splice(index, 1) pour ne retirer qu’un seul Ă©couteur, conformĂ©ment au comportement attendu dĂ©crit dans l’issue #1531.
File Description
src/​dsfr/​core/​script/​api/​utilities/​emitter.js Corrige la suppression d’un listener pour Ă©viter de retirer tous les suivants.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

correctif Quelque chose ne fonctionne pas

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emitter.remove supprime tous les écouteurs suivants (splice sans deleteCount)

2 participants