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

Exception on tables without rows, cells #54

Closed
thisconnect opened this issue Aug 4, 2019 · 0 comments · Fixed by #55
Closed

Exception on tables without rows, cells #54

thisconnect opened this issue Aug 4, 2019 · 0 comments · Fixed by #55
Labels
🗄 area/interface This affects the public interface 💪 phase/solved Post is done 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem

Comments

@thisconnect
Copy link

thisconnect commented Aug 4, 2019

Subject of the issue

This markup errors:
https://github.com/syntax-tree/hast-util-to-mdast/pull/53/files#diff-b6b8d72f26f12669066c4e2850f557c7

for some odd reason, in my test, it only errored if there are 2 input[type=hidden] (inside the table)

TypeError: Cannot read property 'length' of undefined

Your environment

  • OS: macos
  • Packages: hast-util-to-mdast@5.0.0
  • Env: Node v12.5.0, NPM 6.10.1

Steps to reproduce

PR: #53
Error on travis: https://travis-ci.org/syntax-tree/hast-util-to-mdast/jobs/567626032#L699

Expected behaviour

What should happen?

no error

Actual behaviour

What happens instead?

 TypeError: Cannot read property 'length' of undefined
    at one (./node_modules/hast-util-to-mdast/lib/handlers/table.js:77:24)
    at patch (./node_modules/hast-util-to-mdast/lib/handlers/table.js:68:5)
    at table (./node_modules/hast-util-to-mdast/lib/handlers/table.js:10:43)
    at one (./node_modules/hast-util-to-mdast/lib/one.js:24:51)
    at all (./node_modules/hast-util-to-mdast/lib/all.js:15:14)
    at wrapped (./node_modules/hast-util-to-mdast/lib/util/wrap-children.js:9:15)
    at one (./node_modules/hast-util-to-mdast/lib/one.js:24:51)
    at all (./node_modules/hast-util-to-mdast/lib/all.js:15:14)
    at cell (./node_modules/hast-util-to-mdast/lib/handlers/table-cell.js:8:31)
    at one (./node_modules/hast-util-to-mdast/lib/one.js:24:51)
wooorm added a commit that referenced this issue Aug 4, 2019
Closes GH-53.
Closes GH-54.

Co-authored-by: Titus Wormer <tituswormer@gmail.com>
@wooorm wooorm closed this as completed in #55 Aug 5, 2019
wooorm added a commit that referenced this issue Aug 5, 2019
Closes GH-53.
Closes GH-54.
Closes GH-55.

Co-authored-by: Titus Wormer <tituswormer@gmail.com>
@wooorm wooorm changed the title TypeError: Cannot read property 'length' of undefined Exception on tables without rows, cells Aug 12, 2019
@wooorm wooorm added ⛵️ status/released 🐛 type/bug This is a problem 👶 semver/patch This is a backwards-compatible fix 🗄 area/interface This affects the public interface labels Aug 12, 2019
@wooorm wooorm added the 💪 phase/solved Post is done label Apr 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🗄 area/interface This affects the public interface 💪 phase/solved Post is done 👶 semver/patch This is a backwards-compatible fix 🐛 type/bug This is a problem
Development

Successfully merging a pull request may close this issue.

2 participants