mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-16 08:48:32 +01:00
feat: check if a param is a promise with instanceof
This commit is contained in:
parent
0ec26540aa
commit
93245ace70
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ export default class Core extends EventEmitter {
|
||||||
const start = Date.now()
|
const start = Date.now()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (param.then) {
|
if (param instanceof Promise) {
|
||||||
await param
|
await param
|
||||||
await this.registerRtt(Date.now() - start)
|
await this.registerRtt(Date.now() - start)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue