Closed dgarciamuria closed 3 weeks ago
Latest commit: 426cc2a4f1a879efea3dd3c6381dc2797a25e178
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
@all-contributors add @dgarciamuria for code
@stijnvanhulle
@dgarciamuria already contributed before to code
updated snapshot
Issue
If you have
typescript-eslint
enabled in your project, you might run into a situation where you get some errors related about the use of{}
as type after generating the code.Solution
This adds a check to see if
nodes.length
is 0, meaning the node doesnt have any children and thus should be treated as an object instead of creating a new literal node...probably the original condition was wrong since![]
is a falsy value, but decided to keep it as it was to avoid any potential regression