InputDataSource: Fixed issue with config editor (#19818)
This commit is contained in:
@@ -271,6 +271,12 @@ export function toCSV(data: DataFrame[], config?: CSVConfig): string {
|
||||
|
||||
for (const series of data) {
|
||||
const { fields } = series;
|
||||
|
||||
// ignore frames with no fields
|
||||
if (fields.length === 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (config.headerStyle === CSVHeaderStyle.full) {
|
||||
csv =
|
||||
csv +
|
||||
@@ -287,7 +293,9 @@ export function toCSV(data: DataFrame[], config?: CSVConfig): string {
|
||||
}
|
||||
csv += config.newline;
|
||||
}
|
||||
|
||||
const length = fields[0].values.length;
|
||||
|
||||
if (length > 0) {
|
||||
const writers = fields.map(field => makeFieldWriter(field, config!));
|
||||
for (let i = 0; i < length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user