Skip to content

Commit 3f60275

Browse files
committed
fix #1410 for wrong boolean short circuit
1 parent 3c8e174 commit 3f60275

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/BootstrapTable.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ class BootstrapTable extends Component {
10731073
csvFileName = csvFileName();
10741074
}
10751075

1076-
exportCSVUtil(result, keys, csvFileName, separator, noAutoBOM || true, excludeCSVHeader);
1076+
exportCSVUtil(result, keys, csvFileName, separator, noAutoBOM, excludeCSVHeader);
10771077
}
10781078

10791079
handleSearch = searchText => {

src/csv_export_util.js

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ function toString(data, keys, separator, excludeCSVHeader) {
6161
const exportCSV = function(data, keys, filename, separator, noAutoBOM, excludeCSVHeader) {
6262
const dataString = toString(data, keys, separator, excludeCSVHeader);
6363
if (typeof window !== 'undefined') {
64+
noAutoBOM = noAutoBOM === undefined ? true : noAutoBOM;
6465
saveAs(new Blob([ dataString ],
6566
{ type: 'text/plain;charset=utf-8' }),
6667
filename, noAutoBOM);

0 commit comments

Comments
 (0)