mirror of https://github.com/apache/superset.git
fix(sql-lab): recover from Cannot convert object to primitive value issue
A `Cannot convert object to primitive value` error appears in the developer console when trying to format the data coming from Presto. This issue causes the SQL Lab to crash. This can be sorted by stringifying the row data.
This commit is contained in:
parent
fa35109bf2
commit
357e359e5c
|
@ -103,7 +103,13 @@ export function prepareCopyToClipboardTabularData(data, columns) {
|
|||
row[j] = data[i][parseFloat(key)];
|
||||
}
|
||||
}
|
||||
result += `${Object.values(row).join('\t')}\n`;
|
||||
try {
|
||||
result += `${Object.values(row).join('\t')}\n`;
|
||||
catch {
|
||||
result += `${Object.values(row)
|
||||
.map(value => JSON.stringify(value))
|
||||
.join('\t')}\n`;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue