File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -62,15 +62,22 @@ function connect (brokerUrl, opts) {
62
62
throw new Error ( 'Missing protocol' )
63
63
}
64
64
var parsed = new URL ( brokerUrl )
65
+
65
66
// the URL object is a bit special, so copy individual
66
67
// items to the opts object
67
- opts . hostname = parsed . hostname
68
+ opts . hash = parsed . hash
68
69
opts . host = parsed . host
69
- opts . protocol = parsed . protocol
70
+ opts . hostname = parsed . hostname
71
+ opts . href = parsed . href
72
+ opts . origin = parsed . origin
73
+ opts . pathname = parsed . pathname
70
74
opts . port = Number ( parsed . port ) || null
75
+ opts . protocol = parsed . protocol
71
76
opts . username = opts . username || parsed . username
72
77
opts . password = opts . password || parsed . password
78
+ opts . search = parsed . search
73
79
opts . searchParams = parsed . searchParams
80
+ opts . path = parsed . pathname + parsed . search
74
81
opts . protocol = opts . protocol . replace ( / : $ / , '' )
75
82
}
76
83
You can’t perform that action at this time.
0 commit comments