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

Prevent bad access errors when part is undefined #14

Closed

Conversation

hobgoblina
Copy link

@hobgoblina hobgoblina commented Aug 14, 2023

This is to resolve this issue that I'm running into: hapijs/joi#2974 (comment)

There may be a deeper issue worth resolving with regard to evaluate() being called with part === undefined, but I haven't dug that deep.

Either way, I'd expect that it's worth handling this situation gracefully (as is already the case when part === null) rather than letting the type error occur on line 385 where it attempts to call part[internals.symbol].

@hobgoblina
Copy link
Author

@Marsup heyo, any chance I can get some eyes on this? would resolve something that's currently causing problems for me (described in the referenced issue)

@Marsup
Copy link
Collaborator

Marsup commented Sep 17, 2023

As mentioned on joi's side, I've fixed it with hapijs/joi#2986, thanks for the PR though!

@Marsup Marsup closed this Sep 17, 2023
@Marsup Marsup self-assigned this Sep 17, 2023
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