File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -137,10 +137,13 @@ class DiffingTSCompiler implements DiffingBroccoliPlugin {
137137 let errorMessages = [ ] ;
138138
139139 allDiagnostics . forEach ( diagnostic => {
140- var { line, character} = diagnostic . file . getLineAndCharacterOfPosition ( diagnostic . start ) ;
140+ var pos = '' ;
141+ if ( diagnostic . file ) {
142+ var { line, character} = diagnostic . file . getLineAndCharacterOfPosition ( diagnostic . start ) ;
143+ pos = `${ diagnostic . file . fileName } (${ line + 1 } , ${ character + 1 } ): `
144+ }
141145 var message = ts . flattenDiagnosticMessageText ( diagnostic . messageText , '\n' ) ;
142- errorMessages . push (
143- ` ${ diagnostic . file . fileName } (${ line + 1 } ,${ character + 1 } ): ${ message } ` ) ;
146+ errorMessages . push ( ` ${ pos } ${ message } ` ) ;
144147 } ) ;
145148
146149 if ( errorMessages . length ) {
You can’t perform that action at this time.
0 commit comments