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

Cannot read property 'cells' in htmlToGridSettings helper #7311

Closed
mrpiotr-dev opened this issue Oct 5, 2020 · 2 comments
Closed

Cannot read property 'cells' in htmlToGridSettings helper #7311

mrpiotr-dev opened this issue Oct 5, 2020 · 2 comments
Assignees
Milestone

Comments

@mrpiotr-dev
Copy link
Contributor

Description

Our helper htmlToGridSettings throws an error if a passed argument contains an empty table (no rows).
That helper is using in the pasting process and might have a negative impact on the CopyPaste plugin.

Steps to reproduce

  1. Call Handsontable.helper.htmlToGridSettings('<table></table>)

Result:

Uncaught TypeError: Cannot read property 'cells' of null
    at Object.t.htmlToGridSettings

Demo

https://jsfiddle.net/qzoh2p5d/

Your environment

  • Handsontable version: 7.1.0+
  • Browser Name and version: any
  • Operating System: any
@mrpiotr-dev mrpiotr-dev self-assigned this Oct 5, 2020
mrpiotr-dev added a commit that referenced this issue Oct 5, 2020
…tings helper. Adds test spec for that behaviour.
@mrpiotr-dev mrpiotr-dev added this to the October 2020 milestone Oct 6, 2020
mrpiotr-dev pushed a commit that referenced this issue Oct 21, 2020
* #7311 - Fixes throwing errors if a table has no rows in htmlToGridSettings helper. Adds test spec for that behaviour.

* #7311 - Adds CHANGELOG entry. Adjusts code after linter check.
@aninde
Copy link
Contributor

aninde commented Nov 3, 2020

This issue will be fixed in the upcoming v8.2.0.

https://jsfiddle.net/aninde/jc8Lgxtm/

Tested on macOS Catalina 10.15.7

  • Chrome Beta 87 and stable 86
  • FF 83.0b7 and stable 82
  • Safari 14 and Safari Technology Prev 14.1

Windows 10

  • IE 11
  • Edge 86
  • Edge Dev 88

@AMBudnik
Copy link
Contributor

Closed as solved for v 8.2.0.

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

No branches or pull requests

3 participants