Skip to content

Commit 446b23c

Browse files
committed
Fixed the bug of MessageTransport
1 parent ff52d90 commit 446b23c

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

js/MessageTransport.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,12 @@
117117
}
118118

119119
function sendOut() {
120-
var payload = {
121-
transport: true,
122-
destinationName: this._options.device + TOPIC.PING,
123-
payloadBytes: new Uint8Array(this._buf)
124-
};
125120
if (this.isOpen) {
126-
this._window.postMessage(payload, location.origin);
121+
this._window.postMessage({
122+
transport: true,
123+
destinationName: this._options.device + TOPIC.PING,
124+
payloadBytes: new Uint8Array(this._buf)
125+
}, location.origin);
127126
}
128127
clearBuf(this);
129128
}

simulator

Submodule simulator updated from a7d789e to a6417a5

0 commit comments

Comments
 (0)