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

Writing an empty list to a cell results in an error #323

Open
sentientmachin3 opened this issue Nov 3, 2021 · 0 comments
Open

Writing an empty list to a cell results in an error #323

sentientmachin3 opened this issue Nov 3, 2021 · 0 comments

Comments

@sentientmachin3
Copy link

To reproduce this bug you just need to try to write an empty list to a cell.
This results in an error Cannot read property 'length' of undefined.

I think I already have spotted out the problem, here:

.case("array", values => {
                const numRows = values.length;
                const numCols = values[0].length; <---
                const range = this.rangeTo(this.relativeCell(numRows - 1, numCols - 1));
                return range.value(values);
            })

If the list is empty, the values[0] is undefined, which means it is impossible to read the property length.

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

No branches or pull requests

1 participant