feat: check if a param is a promise with instanceof

This commit is contained in:
CosminPerRam 2024-02-24 17:44:18 +02:00
parent 0ec26540aa
commit 93245ace70

View file

@ -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 {