but why don't you write it like:
```js
this._requestsQueue.push(request);

if ( this._authenticationAgent.authenticated ||  this._requestsQueue === 1 ) {
    this._authenticationAgent.ensureAuthentication(
        // ...
    )
}
```
this is equivalent to your code but it lowers the complexity.