File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,14 @@ const { CSVFileModule, CSVURLModule } = require('../modules');
44class BaseCSVExtractor extends Extractor {
55 constructor ( { filePath, url, csvSchema, unalterableColumns } ) {
66 super ( ) ;
7- this . unalterableColumns = unalterableColumns || [ ] ;
8- this . csvSchema = csvSchema ;
9- if ( filePath ) {
10- this . filePath = filePath ;
11- this . csvModule = new CSVFileModule ( this . filePath , this . unalterableColumns ) ;
12- } else if ( url ) {
7+ if ( url ) {
8+ this . unalterableColumns = unalterableColumns || [ ] ;
9+ this . csvSchema = csvSchema ;
1310 this . url = url ;
1411 this . csvModule = new CSVURLModule ( this . url , this . unalterableColumns ) ;
12+ } else if ( filePath ) {
13+ this . filePath = filePath ;
14+ this . csvModule = new CSVFileModule ( this . filePath , this . unalterableColumns ) ;
1515 } else {
1616 throw new Error ( 'Trying to instantiate a CSVExtractor without a filePath or url' ) ;
1717 }
You can’t perform that action at this time.
0 commit comments