-
Notifications
You must be signed in to change notification settings - Fork 53
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
parseTree() returns undefined
on empty string input
#40
Labels
bug
Issue identified by VS Code Team member as probable bug
Milestone
Comments
It's a bug in the spec. |
This was referenced Sep 22, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran into an issue with jsonc.parseTree when my input file was an empty file thus causing the text parameter to be an empty string. My code did something very similar to the following:
This causes an exception at
root.type
when the file atmyFilePath
is empty because root isundefined
.Is this WAI or should the function signature below include
undefined
or the function itself return an emptyNode
whentext
is the empty string?The text was updated successfully, but these errors were encountered: