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 if node has no child #31

Merged
merged 1 commit into from
Oct 10, 2023
Merged

fix if node has no child #31

merged 1 commit into from
Oct 10, 2023

Conversation

ugogon
Copy link
Contributor

@ugogon ugogon commented Oct 9, 2023

In case an element of the AST has no children we access an undefined child. This PR tests if children are present before accessing the first.

Fixes #30

@netlify
Copy link

netlify bot commented Oct 9, 2023

Deploy Preview for rehype-citation ready!

Name Link
🔨 Latest commit c81d904
🔍 Latest deploy log https://app.netlify.com/sites/rehype-citation/deploys/65243539d2f2be000854a323
😎 Deploy Preview https://deploy-preview-31--rehype-citation.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@timlrx timlrx merged commit 9f7849b into timlrx:main Oct 10, 2023
4 checks passed
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.

TypeError: Cannot read properties of undefined (reading 'value')
2 participants