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');
4
4
class BaseCSVExtractor extends Extractor {
5
5
constructor ( { filePath, url, csvSchema, unalterableColumns } ) {
6
6
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 ;
13
10
this . url = url ;
14
11
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 ) ;
15
15
} else {
16
16
throw new Error ( 'Trying to instantiate a CSVExtractor without a filePath or url' ) ;
17
17
}
You can’t perform that action at this time.
0 commit comments