Skip to content

Commit

Permalink
reapplied patch
Browse files Browse the repository at this point in the history
  • Loading branch information
seriousme committed Sep 3, 2020
1 parent c111fa1 commit ac98686
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/connect/ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const WS = require('ws')
const debug = require('debug')('mqttjs:ws')
const duplexify = require('duplexify')
const Buffer = require('safe-buffer').Buffer
const urlModule = require('url')
const Transform = require('readable-stream').Transform

let WSS_OPTIONS = [
Expand Down Expand Up @@ -70,7 +69,7 @@ function setDefaultBrowserOpts (opts) {
if (typeof (document) === 'undefined') {
throw new Error('Could not determine host. Specify host manually.')
}
const parsed = urlModule.parse(document.URL)
const parsed = new URL(document.URL)
options.hostname = parsed.hostname

if (!options.port) {
Expand Down

0 comments on commit ac98686

Please sign in to comment.