Skip to content

Commit 1e49e86

Browse files
committed
small fix in error handling
1 parent 66072c9 commit 1e49e86

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ export class DataSchemaCompiler {
736736
if (e.toString().indexOf('SyntaxError') !== -1) {
737737
const err = e as SyntaxErrorInterface;
738738
const line = file.content.split('\n')[(err.loc?.start?.line || 1) - 1];
739-
const spaces = Array(err.loc?.start.column).fill(' ').join('');
739+
const spaces = Array(err.loc?.start?.column).fill(' ').join('') || '';
740740
errorsReport.error(`Syntax error during parsing: ${err.message}:\n${line}\n${spaces}^`, file.fileName);
741741
} else {
742742
errorsReport.error(e);

0 commit comments

Comments
 (0)