File tree 1 file changed +14
-5
lines changed
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 {
95
95
}
96
96
97
97
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 = {
102
99
url : fullUrl ,
103
- port : hostPortSplit && + hostPortSplit [ 1 ]
100
+ port : 0
104
101
} ;
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 ;
105
114
}
106
115
}
107
116
You can’t perform that action at this time.
0 commit comments