Skip to content

Commit 6a0e50a

Browse files
authored
fix(auth opts): Default to null for false-y values (mqttjs#1197)
1 parent 928a0a4 commit 6a0e50a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/connect/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ function connect (brokerUrl, opts) {
7373
opts.pathname = parsed.pathname
7474
opts.port = Number(parsed.port) || null
7575
opts.protocol = parsed.protocol
76-
opts.username = opts.username || parsed.username
77-
opts.password = opts.password || parsed.password
76+
opts.username = opts.username || parsed.username || null
77+
opts.password = opts.password || parsed.password || null
7878
opts.search = parsed.search
7979
opts.searchParams = parsed.searchParams
8080
opts.path = parsed.pathname + parsed.search

0 commit comments

Comments
 (0)