Commit 7267f2b5 authored by Anton's avatar Anton

Fix CSV output on undefined values

parent 686d152d
......@@ -63,7 +63,7 @@
}
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