Browse Source

REPORT-110595 fix: 数据连接-删除数据连接失败

research/11.0
Austin.Duan 12 months ago
parent
commit
2d14eb0480
  1. 8
      src/modules/crud/decision.api.ts

8
src/modules/crud/decision.api.ts

@ -91,11 +91,7 @@ export class DecisionApi implements Api {
} }
getSocketStatus(): boolean { getSocketStatus(): boolean {
if (Dec) { return !!Dec?.socket?.connected;
return Dec.socket.connected;
}
return false;
} }
isDriverError(errorCode: string) { isDriverError(errorCode: string) {
@ -122,7 +118,7 @@ export class DecisionApi implements Api {
private sendEditStatusEvent(name: string, type: string): Promise<SocketResult> { private sendEditStatusEvent(name: string, type: string): Promise<SocketResult> {
return new Promise(resolve => { return new Promise(resolve => {
if (Dec && Dec.socket.connected) { if (Dec?.socket?.connected) {
Dec.socketEmit(type, BI.encode(name), (re: any) => { Dec.socketEmit(type, BI.encode(name), (re: any) => {
resolve(re); resolve(re);
}); });

Loading…
Cancel
Save