Fixed #413 - DataTable: Exporting an empty DataTable throws TypeError

pull/426/head
cagataycivici 2020-08-04 15:46:23 +03:00
parent aac75d9084
commit ab589686f1
1 changed files with 27 additions and 25 deletions

View File

@ -953,6 +953,7 @@ export default {
} }
//body //body
if (data) {
data.forEach(record => { data.forEach(record => {
csv += '\n'; csv += '\n';
for (let i = 0; i < this.columns.length; i++) { for (let i = 0; i < this.columns.length; i++) {
@ -982,6 +983,7 @@ export default {
} }
} }
}); });
}
let blob = new Blob([csv], { let blob = new Blob([csv], {
type: 'text/csv;charset=utf-8;' type: 'text/csv;charset=utf-8;'