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