Skip to content

Commit c1b769e

Browse files
committed
Update ws.js
1 parent 6bd407e commit c1b769e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/connect/ws.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ function buildBuilder (client, opts) {
2323

2424
function buildBuilderBrowser (mqttClient, opts) {
2525
var url, parsed;
26-
if (typeof(document) !== 'undefined') { // for Web Workers! P.S: typeof(document) !== undefined may be becoming the faster one these days.
26+
if (typeof (document) !== 'undefined') { // for Web Workers! P.S: typeof(document) !== undefined may be becoming the faster one these days.
2727
parsed = _URL.parse(document.URL);
2828
} else {
29-
throw "Could not determine host. Specify host manually.";
29+
throw new Error('Could not determine host. Specify host manually.');
3030
}
31-
31+
3232
if (!opts.protocol) {
3333
if ('https:' === parsed.protocol) {
3434
opts.protocol = 'wss';

0 commit comments

Comments
 (0)