We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a83b7ac commit 38c78f3Copy full SHA for 38c78f3
Csv.js
@@ -157,6 +157,12 @@ define([
157
if (i > -1) { output += newline; }
158
for (j = 0; j < fieldNames.length; j++) {
159
value = i < 0 ? fieldNames[j] : data[i][fieldNames[j]];
160
+ if (value === null || value === undefined) {
161
+ value = '';
162
+ }
163
+ if (typeof value !== 'string') {
164
+ value = value.toString();
165
166
needsQuotes = alwaysQuote ||
167
value.indexOf('"') >= 0 || value.indexOf(delimiter) >= 0;
168
output += (j > 0 ? delimiter : '') +
0 commit comments