diff --git a/src/store/columnsStore.ts b/src/store/columnsStore.ts index 381fb86..6fc7f5b 100644 --- a/src/store/columnsStore.ts +++ b/src/store/columnsStore.ts @@ -16,7 +16,7 @@ export function useColumnsStore() { for (const track of tracks) { for (const key of keys) { const column = track[key]; - if (column !== undefined && ![...columnsList, ...SPECIAL_KEYS].includes(column)) { + if (column && ![...columnsList, ...SPECIAL_KEYS].includes(column)) { columnsList.push(column); } } @@ -28,7 +28,6 @@ export function useColumnsStore() { columns.value[datasetId] = columns.value[datasetId] || {}; const columnsAvailable = Object.keys(columns.value[datasetId]); const columnsList = getColumns(tracks, keys).filter((x) => !columnsAvailable.includes(x)); - if (columnsList.length > 0) { const columnsData = await datasetsGetColumns(datasetId, columnsList); if (columnsData) { @@ -43,7 +42,7 @@ export function useColumnsStore() { const trackEntry: Record = {}; keys.forEach((key) => { const column = track[key]; - if (column !== undefined && !SPECIAL_KEYS.includes(column)) { + if (column && !SPECIAL_KEYS.includes(column)) { trackEntry[key] = columns.value[datasetId][column]; } });