diff --git a/dlt-connector/src/manager/InterruptiveSleepManager.ts b/dlt-connector/src/manager/InterruptiveSleepManager.ts index 3fc5a9b88..7827c8fe9 100644 --- a/dlt-connector/src/manager/InterruptiveSleepManager.ts +++ b/dlt-connector/src/manager/InterruptiveSleepManager.ts @@ -54,10 +54,10 @@ export class InterruptiveSleepManager { if (!this.interruptiveSleep.has(key)) { this.interruptiveSleep.set(key, new InterruptiveSleep(this.stepSizeMilliseconds)) } - const cond = this.interruptiveSleep.get(key) - if (!cond) { + const interruptiveSleep = this.interruptiveSleep.get(key) + if (!interruptiveSleep) { throw new LogError('map entry not exist after setting it') } - return cond.sleep(ms) + return interruptiveSleep.sleep(ms) } }