File tree Expand file tree Collapse file tree
src/vs/workbench/parts/terminal/electron-browser Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -226,12 +226,15 @@ export class TerminalLinkHandler {
226226
227227 private _resolvePath ( link : string ) : TPromise < string > {
228228 link = this . _preprocessPath ( link ) ;
229-
230229 if ( ! link ) {
231230 return TPromise . as ( void 0 ) ;
232231 }
233232
234233 const linkUrl = this . extractLinkUrl ( link ) ;
234+ if ( ! linkUrl ) {
235+ return TPromise . as ( void 0 ) ;
236+ }
237+
235238 // Open an editor if the path exists
236239 return pfs . fileExists ( linkUrl ) . then ( isFile => {
237240 if ( ! isFile ) {
@@ -292,6 +295,9 @@ export class TerminalLinkHandler {
292295 */
293296 public extractLinkUrl ( link : string ) : string {
294297 const matches : string [ ] = this . _localLinkRegex . exec ( link ) ;
298+ if ( ! matches ) {
299+ return null ;
300+ }
295301 return matches [ 1 ] ;
296302 }
297303}
You can’t perform that action at this time.
0 commit comments