@@ -755,14 +755,14 @@ Url.prototype.resolveObject = function resolveObject(relative) {
755
755
var removeAllDots = mustEndAbs ;
756
756
var srcPath = result . pathname && result . pathname . split ( '/' ) || [ ] ;
757
757
var relPath = relative . pathname && relative . pathname . split ( '/' ) || [ ] ;
758
- var psychotic = result . protocol && ! slashedProtocol [ result . protocol ] ;
758
+ var noLeadingSlashes = result . protocol && ! slashedProtocol [ result . protocol ] ;
759
759
760
760
// if the url is a non-slashed url, then relative
761
761
// links like ../.. should be able
762
762
// to crawl up to the hostname, as well. This is strange.
763
763
// result.protocol has already been set by now.
764
764
// Later on, put the first path part into the host field.
765
- if ( psychotic ) {
765
+ if ( noLeadingSlashes ) {
766
766
result . hostname = '' ;
767
767
result . port = null ;
768
768
if ( result . host ) {
@@ -810,7 +810,7 @@ Url.prototype.resolveObject = function resolveObject(relative) {
810
810
// just pull out the search.
811
811
// like href='?foo'.
812
812
// Put this after the other two cases because it simplifies the booleans
813
- if ( psychotic ) {
813
+ if ( noLeadingSlashes ) {
814
814
result . hostname = result . host = srcPath . shift ( ) ;
815
815
//occasionally the auth can get stuck only in host
816
816
//this especially happens in cases like
@@ -891,7 +891,7 @@ Url.prototype.resolveObject = function resolveObject(relative) {
891
891
( srcPath [ 0 ] && srcPath [ 0 ] . charAt ( 0 ) === '/' ) ;
892
892
893
893
// put the host back
894
- if ( psychotic ) {
894
+ if ( noLeadingSlashes ) {
895
895
result . hostname = result . host = isAbsolute ? '' :
896
896
srcPath . length ? srcPath . shift ( ) : '' ;
897
897
//occasionally the auth can get stuck only in host
0 commit comments