mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
Due to the single-instance version of the WebSocket, the onMessage response res contains only one layer of data. For compatibility with the online game, Taobao removed the extra layer of data (#17389)
This commit is contained in:
@@ -42,8 +42,8 @@ export default class MultiWebSocket {
|
||||
|
||||
socketTask.onMessage((res) => {
|
||||
if (typeof this.onmessage === 'function') {
|
||||
if (res && res.data && res.data.data && res.data.isBuffer) {
|
||||
res.data = _utils.base64ToArrayBuffer(res.data.data)
|
||||
if (res && res.data && res.isBuffer) {
|
||||
res.data = _utils.base64ToArrayBuffer(res.data)
|
||||
}
|
||||
this.onmessage(res)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user