aboutsummaryrefslogtreecommitdiffstats
path: root/packages/kovan-faucets/src/ts/request_queue.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/kovan-faucets/src/ts/request_queue.ts')
-rw-r--r--packages/kovan-faucets/src/ts/request_queue.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/kovan-faucets/src/ts/request_queue.ts b/packages/kovan-faucets/src/ts/request_queue.ts
index ea3eee18e..2b42ca4bf 100644
--- a/packages/kovan-faucets/src/ts/request_queue.ts
+++ b/packages/kovan-faucets/src/ts/request_queue.ts
@@ -38,10 +38,10 @@ export class RequestQueue {
}
protected start() {
this.queueIntervalId = timers.setInterval(() => {
- if (this.queue.length === 0) {
+ const recipientAddress = this.queue.shift();
+ if (_.isUndefined(recipientAddress)) {
return;
}
- const recipientAddress = this.queue.shift();
// tslint:disable-next-line:no-floating-promises
this.processNextRequestFireAndForgetAsync(recipientAddress);
}, this.queueIntervalMs);