Skip to content

Commit 876f7cd

Browse files
committed
fix: socket 判断类型失败导致无法发出消息
1 parent de85d37 commit 876f7cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/api-proxy/src/platform/api/socket/SocketTask.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class SocketTask {
4242

4343
send (options = {}) {
4444
const { data = '', success, fail, complete } = options
45-
if (typeof data !== 'string' || type(data) !== 'ArrayBuffer') {
45+
if (typeof data !== 'string' && type(data) !== 'ArrayBuffer') {
4646
const res = { errMsg: 'sendSocketMessage:fail Unsupported data type' }
4747
failHandle(res, fail, complete)
4848
} else if (this._socket.readyState === 1) {

0 commit comments

Comments
 (0)