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

Parser Attribute value undefined for empty string #6286

Closed
pushkine opened this issue May 3, 2021 · 1 comment · Fixed by #6539
Closed

Parser Attribute value undefined for empty string #6286

pushkine opened this issue May 3, 2021 · 1 comment · Fixed by #6539
Labels

Comments

@pushkine
Copy link
Contributor

pushkine commented May 3, 2021

https://astexplorer.net/#/gist/30071e5e2620f2d0e2e38f54cb7350b8/a5398ab81434679120e3d97c516bba48143bc3c5

<input foo="" />
{
  "start": 7,
  "end": 13,
  "type": "Attribute",
  "name": "foo",
  "value": []
}

Unexpected : value is undefined

Expected

"value": [
  {
    "start": 12,
    "end": 12,
    "type": "Text",
    "raw": "",
    "data": ""
  }
]
@Conduitry
Copy link
Member

This now parses as (an array containing) an empty string in 3.40.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants