fix no arguments for both cli and direct
This commit is contained in:
parent
eabaa68da2
commit
b060572ec5
2 changed files with 3 additions and 3 deletions
|
@ -74,9 +74,9 @@ export default class Cli {
|
|||
cmd = (await input("Send command: ")).split(' ');
|
||||
const method = cmd[0];
|
||||
|
||||
const params = cmd.length > 1 ? cmd.shift() && cmd : "";
|
||||
const params = cmd.length > 1 ? cmd.shift() && cmd : [];
|
||||
|
||||
console.log(await this.client.sendRequest(method, params || []));
|
||||
console.log(await this.client.sendRequest(method, params));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ async function main() {
|
|||
|
||||
const method = cmd[0];
|
||||
|
||||
const params = cmd.length > 1 ? cmd.shift() && cmd : "";
|
||||
const params = cmd.length > 1 ? cmd.shift() && cmd : [];
|
||||
|
||||
const client = new Client(false);
|
||||
await client.connect([server[0], parseInt(server[1])]);
|
||||
|
|
Loading…
Reference in a new issue