From 680c19508457d915ffe0ac9aa4a9f9c24f981da4 Mon Sep 17 00:00:00 2001 From: "Austin.Duan" Date: Thu, 28 Mar 2024 16:33:37 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-15739=20fix:=20=E3=80=90=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E6=8B=86=E5=88=86=E3=80=91=E6=95=B0=E6=8D=AE=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E8=A1=A5=E5=85=85=E4=B8=8Bsocket=E8=BF=9E=E6=8E=A5?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/crud/decision.api.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/crud/decision.api.ts b/src/modules/crud/decision.api.ts index b967a0a..8b8c983 100644 --- a/src/modules/crud/decision.api.ts +++ b/src/modules/crud/decision.api.ts @@ -64,6 +64,10 @@ export class DecisionApi implements Api { // TODO: 当前emit同步回调已无法执行 this.sendEditStatusEvent(name, editStatusEvent.OPEN); + if (Dec.socket?.connected) { + return Promise.resolve({ data: 'success' }); + } + return new Promise((resolve, rejected) => { this.addEventListener(editStatusEvent.OPEN, res => { const data = JSON.parse(res.data);