File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -95,13 +95,22 @@ export class DebugService extends EventEmitter implements IDebugService {
9595 }
9696
9797 private getDebugInformation ( fullUrl : string ) : IDebugInformation {
98- const parseQueryString = true ;
99- const wsQueryParam = parse ( fullUrl , parseQueryString ) . query . ws ;
100- const hostPortSplit = wsQueryParam && wsQueryParam . split ( ":" ) ;
101- return {
98+ let debugInfo : IDebugInformation = {
10299 url : fullUrl ,
103- port : hostPortSplit && + hostPortSplit [ 1 ]
100+ port : 0
104101 } ;
102+
103+ if ( fullUrl ) {
104+ const parseQueryString = true ;
105+ const wsQueryParam = parse ( fullUrl , parseQueryString ) . query . ws ;
106+ const hostPortSplit = wsQueryParam && wsQueryParam . split ( ":" ) ;
107+ debugInfo = {
108+ url : fullUrl ,
109+ port : hostPortSplit && + hostPortSplit [ 1 ]
110+ } ;
111+ }
112+
113+ return debugInfo ;
105114 }
106115}
107116
You can’t perform that action at this time.
0 commit comments