mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-16 00:38:31 +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()
|
||||
|
||||
try {
|
||||
if (param.then) {
|
||||
if (param instanceof Promise) {
|
||||
await param
|
||||
await this.registerRtt(Date.now() - start)
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue