From 2f4e6d3caa93a9035696c4702d8aaf81886f73df Mon Sep 17 00:00:00 2001 From: bofeng-song Date: Thu, 18 Jul 2024 16:28:26 +0800 Subject: [PATCH] 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) --- .../taobao-mini-game/wrapper/builtin/MultiWebSocket.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platforms/minigame/platforms/taobao-mini-game/wrapper/builtin/MultiWebSocket.js b/platforms/minigame/platforms/taobao-mini-game/wrapper/builtin/MultiWebSocket.js index 1244e30c37..bc2b857335 100644 --- a/platforms/minigame/platforms/taobao-mini-game/wrapper/builtin/MultiWebSocket.js +++ b/platforms/minigame/platforms/taobao-mini-game/wrapper/builtin/MultiWebSocket.js @@ -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) }