File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,8 @@ const crawl = async opt => {
181181 // url.parse returns a string,
182182 // but options port is passed by a user and default value is a number
183183 // we are converting both to string to be sure
184- const isOnAppPort = port . toString ( ) === options . port . toString ( ) ;
184+ // Port can be null, therefore we need the null check
185+ const isOnAppPort = port && port . toString ( ) === options . port . toString ( ) ;
185186
186187 if ( hostname === "localhost" && isOnAppPort && ! uniqueUrls . has ( newUrl ) && ! streamClosed ) {
187188 uniqueUrls . add ( newUrl ) ;
Original file line number Diff line number Diff line change 66
77< body >
88 < a href ="http://localhost:55555 "> localhost link on a different port</ a >
9+ < a href ="http://localhost "> localhost link with no port</ a >
910</ body >
1011
1112</ html >
You can’t perform that action at this time.
0 commit comments