refactor: tidy up _inactive check

This commit is contained in:
Amish Shah
2018-05-02 18:04:47 +01:00
parent b5f37728a7
commit 27a0f48441

View File

@@ -27,10 +27,7 @@ class RequestHandler {
}
get _inactive() {
return this.queue.length === 0 &&
!this.limited &&
Date.now() > this.resetTime &&
(typeof this.busy === 'undefined' || this.busy === false);
return this.queue.length === 0 && !this.limited && Date.now() > this.resetTime && this.busy !== true;
}
execute(item) {