Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Check whether node.children is undefined #8

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

Closed
alexander-turner wants to merge 1 commit into syntax-tree:main from alexander-turner:patch-1

Conversation

@alexander-turner
Copy link

@alexander-turner alexander-turner commented Apr 1, 2024

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and couldn’t find anything (or linked relevant results below)
  • If applicable, I’ve added docs and tests (Note: I don't see where to add a test to make sure this gets caught)

Description of changes

A function wasn't checking that a property was defined before trying to access that property's length field. The function now returns the empty list if the property is undefined.

Signed-off-by: Alex Turner <alex@turntrout.com>
@github-actions github-actions bot added the 👋 phase/new Post is being triaged automatically label Apr 1, 2024

This comment has been minimized.

Copy link
Member

wooorm commented Apr 1, 2024

Hey Alex! The function is only called on nodes with children. You are apparently seeing some issue. There is a root problem somewhere. You can try patching it here, but you’ll run into it everywhere. Better to figure out the root cause. Can you do some debugging and figure out why you have parent nodes without children?

Copy link
Member

wooorm commented Apr 3, 2024

Closing as this is probably a problem in your code somewhere else!

@wooorm wooorm closed this Apr 3, 2024
@wooorm wooorm added the 👀 no/external This makes more sense somewhere else label Apr 3, 2024

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 👋 phase/new Post is being triaged automatically labels Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

👀 no/external This makes more sense somewhere else 👎 phase/no Post cannot or will not be acted on

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /