From 93245ace7055f344adb8b09e3d1714af377b4ce6 Mon Sep 17 00:00:00 2001 From: CosminPerRam Date: Sat, 24 Feb 2024 17:44:18 +0200 Subject: [PATCH] feat: check if a param is a promise with instanceof --- protocols/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocols/core.js b/protocols/core.js index 02e5c4c..38c85fe 100644 --- a/protocols/core.js +++ b/protocols/core.js @@ -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 {