fix: make condition.
This commit is contained in:
parent
d8058ec063
commit
b206104627
@ -983,7 +983,7 @@ class Client extends BaseClient {
|
|||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
sleep(miliseconds) {
|
sleep(miliseconds) {
|
||||||
return new Promise(r => setTimeout(r, miliseconds));
|
return typeof miliseconds === 'number' ? new Promise(r => setTimeout(r, miliseconds)) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user