feat: use another optional chaining

This commit is contained in:
CosminPerRam 2024-02-24 18:14:28 +02:00
parent b1b41d6e24
commit b5c22141db

View file

@ -239,7 +239,7 @@ export default class Core extends EventEmitter {
timeout = Promises.createTimeout(this.options.socketTimeout, 'TCP') timeout = Promises.createTimeout(this.options.socketTimeout, 'TCP')
return await Promise.race([promise, timeout, this.abortedPromise]) return await Promise.race([promise, timeout, this.abortedPromise])
} finally { } finally {
timeout && timeout.cancel() timeout?.cancel()
} }
} }