Skip to content

Commit 86ca6a4

Browse files
committed
simplified code
1 parent 1255903 commit 86ca6a4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/cubejs-schema-compiler/src/compiler/DataSchemaCompiler.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,9 @@ export class DataSchemaCompiler {
215215
this.pythonContext = await this.loadPythonContext(files, 'globals.py');
216216
this.yamlCompiler.initFromPythonContext(this.pythonContext);
217217

218-
const toCompile = files.filter((f) => !this.filesToCompile || !this.filesToCompile.length || this.filesToCompile.indexOf(f.fileName) !== -1);
218+
const toCompile = this.filesToCompile?.length
219+
? files.filter(f => this.filesToCompile.includes(f.fileName))
220+
: files;
219221

220222
const errorsReport = new ErrorReporter(null, [], this.errorReportOptions);
221223
this.errorsReporter = errorsReport;

0 commit comments

Comments
 (0)