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

fix(modules/a11y): filter out falsy pagination elems #7201

Merged

Conversation

jordanrastrick
Copy link
Contributor

Similar to #6823 I am noticing intermittent exceptions generated in the destroy() method of the a11y module, in this case where the el argument to the callback passed to paginationEl.forEach is undefined and so the attempt to .removeEventListener is a TypeError. As in the previous case, because these exceptions are thrown from within an event handler they are uncatchable and crash the entire page.

It looks like the use of makeElementsArray, which filters out such falsy elements (and should otherwise behave identically to the existing code), is also required with the pagination element.

@nolimits4web nolimits4web merged commit a044626 into nolimits4web:master Nov 22, 2023
3 checks passed
@nolimits4web
Copy link
Owner

Merged, thank you

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 this pull request may close these issues.

2 participants