Skip to content

Conversation

@bendesilva
Copy link

@bendesilva bendesilva commented Feb 25, 2022

When using the table within a block editor, having created a table, left the document and returned, adding a new row/s would result in a Cannot add property x, object is not extensible error in the console.

Both the addRows and addRowAt functions were using spread syntax when assigning the newValue const, rather than using the deepClone function which is used by all other functions, resulting in the error.

Switching to the deepClone function has resolved this issue.

…ad syntax

When using the table within a block editor, having created a table, left the document and returned, adding a new row/s would result in an 'can't define property "x": "obj" is not extensible' error in the console.

Both the `addRows` and `addRowAt` functions were using spread syntax when assigning the `newValue` const, rather than using the `deepClone` function which is used by all other functions, which resulted in the error.
@MathisBullinger
Copy link

@rdunk this fixes #14

@mckelveygreg
Copy link

Thank you so much! I'm yarn patching this until it gets merged 🎉

@MathisBullinger
Copy link

@mckelveygreg I made a fork that fixes this and some other issues that I'm maintaining for a work project.

Should this repo become active again, I'd be more than happy to contribute any patches and updates here instead of maintaining a fork.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants