Skip to content

Commit 026fd95

Browse files
authored
Merge pull request #194 from markevans-sky/no-implicit-global-websocket
No implicit global WebSocket
2 parents 55cf306 + 03c553f commit 026fd95

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/paho-mqtt.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1057,9 +1057,9 @@ function onMessageArrived(message) {
10571057

10581058

10591059
if (this.connectOptions.mqttVersion < 4) {
1060-
this.socket = new WebSocket(wsurl, ["mqttv3.1"]);
1060+
this.socket = new global.WebSocket(wsurl, ["mqttv3.1"]);
10611061
} else {
1062-
this.socket = new WebSocket(wsurl, ["mqtt"]);
1062+
this.socket = new global.WebSocket(wsurl, ["mqtt"]);
10631063
}
10641064
this.socket.binaryType = "arraybuffer";
10651065
this.socket.onopen = scope(this._on_socket_open, this);

src/test/client-harness.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ global.Paho = Paho
6565

6666

6767
function ensureValue(prop, value) {
68-
if (prop === '' || prop[0] === '$') {
68+
if (prop === undefined || prop === '' || prop[0] === '$') {
6969
return value
7070
}
7171
return prop

0 commit comments

Comments
 (0)