telnet-client
Advanced tools
Comparing version 2.2.2 to 2.2.3
@@ -155,6 +155,7 @@ "use strict"; | ||
const isReady = []; | ||
if ((data = this.parseData(data, isReady)) && connectionPending && (isReady[0] || !this.opts.shellPrompt)) { | ||
const parsedData = this.parseData(data, isReady); | ||
if (parsedData && connectionPending && (isReady[0] || !this.opts.shellPrompt)) { | ||
resolveIt(); | ||
if (!this.opts.shellPrompt && !emitted) | ||
this.emit('data', data); | ||
this.emit('data', parsedData); | ||
} | ||
@@ -358,3 +359,3 @@ }); | ||
if (this.state === 'getprompt') { | ||
const stringData = this.decoder.write(chunk); | ||
const stringData = chunk ? this.decoder.write(chunk) : ''; | ||
const decodedData = this.decode(stringData); | ||
@@ -361,0 +362,0 @@ const promptIndex = (0, utils_1.search)(decodedData, this.opts.shellPrompt); |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"main": "./lib/index.js", | ||
@@ -11,0 +11,0 @@ "types": "./lib/index.d.ts", |
Sorry, the diff of this file is not supported yet
64625
640