Fix bug processing empty string tokens

This commit is contained in:
Jeremy Ruston
2024-10-20 12:55:11 +01:00
parent bd86723b72
commit 8b2afd1cc2
+1 -1
View File
@@ -105,7 +105,7 @@ Commander.prototype.getTokensUntilCommand = function(callback) {
if(err) {
return callback(err);
}
if(!data || data.substr(0,2) === "--") {
if(data === null || data.substr(0,2) === "--") {
return callback(null,tokens);
} else {
self.getNextToken(function(err,data) {