Skip to content

Commit

Permalink
feat: improve validation in sale command when agent is not connected
Browse files Browse the repository at this point in the history
  • Loading branch information
mastudillot committed Aug 19, 2024
1 parent d3ef676 commit de2afa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pos.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class TransbankPOSWebSocket extends EventEmitter {
let ts = Date.now();
let eventName = method + ".response" + ts;

if (!this.isConnected && this.socket!==null) {
if (!this.isConnected || this.socket == null) {
reject("Debe conectarse para poder enviar mensajes: Puede conectarse con POS.connect()")
return
}
Expand Down

0 comments on commit de2afa1

Please sign in to comment.