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: JS error with toc item on page navigation. #3880

Merged
merged 1 commit into from
Jun 25, 2023

Conversation

KevinMulhern
Copy link
Member

Because:

  • We are removing the toc items so they won't be cached, but we are still observing them with an intersection observer.

This commit:

  • Unobserve all headings before destroying them on page navigation.

Because:
* We are removing the toc items so they won't be cached, but we are still observing them with an intersection observer.

This commit:
* Unobserve all headings before destroying them on page navigation.
@KevinMulhern KevinMulhern self-assigned this Jun 25, 2023
@KevinMulhern KevinMulhern added the Type: Bug Involves something that isn't working as intended label Jun 25, 2023
@KevinMulhern KevinMulhern temporarily deployed to odin-review-app-pr-3880 June 25, 2023 14:18 Inactive
@KevinMulhern KevinMulhern merged commit 4cad719 into main Jun 25, 2023
2 checks passed
@KevinMulhern KevinMulhern deleted the fix/toc-observing-destroyed-toc-items branch June 25, 2023 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Involves something that isn't working as intended
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants