Skip to content

Commit 31b5550

Browse files
committed
Fix config does not work (#115)
1 parent 9e415b6 commit 31b5550

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/useCSVReader.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ function useCSVReaderComponent<T = any>() {
298298
const reader = new window.FileReader();
299299
let percentage = 0;
300300

301-
configs = Object.assign({}, config, configs);
302301
acceptedFiles.forEach((file: File) => {
303302
dispatch({
304303
acceptedFile: file,
@@ -344,6 +343,8 @@ function useCSVReaderComponent<T = any>() {
344343
setProgressBarPercentage(percentage);
345344
},
346345
};
346+
configs = Object.assign({}, config, configs);
347+
347348
reader.onload = (e: any) => {
348349
PapaParse.parse(e.target.result, configs);
349350
};

0 commit comments

Comments
 (0)