We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 55cf306 + 03c553f commit 026fd95Copy full SHA for 026fd95
src/paho-mqtt.js
@@ -1057,9 +1057,9 @@ function onMessageArrived(message) {
1057
1058
1059
if (this.connectOptions.mqttVersion < 4) {
1060
- this.socket = new WebSocket(wsurl, ["mqttv3.1"]);
+ this.socket = new global.WebSocket(wsurl, ["mqttv3.1"]);
1061
} else {
1062
- this.socket = new WebSocket(wsurl, ["mqtt"]);
+ this.socket = new global.WebSocket(wsurl, ["mqtt"]);
1063
}
1064
this.socket.binaryType = "arraybuffer";
1065
this.socket.onopen = scope(this._on_socket_open, this);
src/test/client-harness.js
@@ -65,7 +65,7 @@ global.Paho = Paho
65
66
67
function ensureValue(prop, value) {
68
- if (prop === '' || prop[0] === '$') {
+ if (prop === undefined || prop === '' || prop[0] === '$') {
69
return value
70
71
return prop
0 commit comments