Manage a null value update on Dataframe (#1580)

Co-authored-by: Ian Gonzalez <ian.gl@protonmail.com>
This commit is contained in:
Ian González 2022-06-16 03:13:24 -06:00 committed by GitHub
parent 78af573990
commit d0b521510d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,10 +19,12 @@
export let label: string | null = null;
$: {
if (!Array.isArray(value)) {
if (value && !Array.isArray(value)) {
if (Array.isArray(value.headers)) headers = value.headers;
value =
value.data.length === 0 ? [Array(headers.length).fill("")] : value.data;
} else if (value === null) {
value = [Array(headers.length).fill("")];
} else {
value = value;
}