Commit ba2db7c0 authored by Anton's avatar Anton

Fix csv export for undefined values

parent 6fe719dd
Pipeline #14418 passed with stage
in 1 minute and 27 seconds
......@@ -27,7 +27,7 @@ const exportCSV = function (items, filename = undefined) {
}))
let csvData = 'data:text/csv;charset=utf-8,'
entries.forEach(entry => {
csvData += entry.map(v => `"${v.toString().replace('"', '\\"')}"`).join(';') + '\r\n'
csvData += entry.map(v => `"${(v || '').toString().replace('"', '\\"')}"`).join(';') + '\r\n'
})
const download = document.createElement('a')
download.setAttribute('href', encodeURI(csvData))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment