Skip to content

Commit

Permalink
docs: revert iteration of NodeeList
Browse files Browse the repository at this point in the history
  • Loading branch information
tmair committed Jan 4, 2024
1 parent a39f81e commit 81ea79c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/rxjs.dev/src/app/shared/toc.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ export class TocService {
const div: HTMLDivElement = this.document.createElement('div');
div.innerHTML = heading.innerHTML;
const anchorLinks: NodeListOf<HTMLAnchorElement> = div.querySelectorAll('a');
for (const anchorLink of anchorLinks) {
// eslint-disable-next-line @typescript-eslint/prefer-for-of
for (let i = 0; i < anchorLinks.length; i++) {
const anchorLink = anchorLinks[i];
if (!anchorLink.classList.contains('header-link')) {
// this is an anchor that contains actual content that we want to keep
// move the contents of the anchor into its parent
Expand Down

0 comments on commit 81ea79c

Please sign in to comment.