Commit 0495234e authored by liwei's avatar liwei

fix: 发送帧消息时先拷贝数据

本地转发前换边会改到同一份状态。
parent 14bbeef3
...@@ -53,7 +53,8 @@ export class L2_boardgame2_NetworkHelper { ...@@ -53,7 +53,8 @@ export class L2_boardgame2_NetworkHelper {
async stopFrameSync() { } async stopFrameSync() { }
sendFrame(data: any) { sendFrame(data: any) {
const event = { data: { frame: { items: [{ data: data }] } } }; const payload = JSON.parse(JSON.stringify(data));
const event = { data: { frame: { items: [{ data: payload }] } } };
setTimeout(() => { setTimeout(() => {
if (this._closed) { if (this._closed) {
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment