Skip to content

Commit

Permalink
feat: resolve warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Gautam Jethwani committed Sep 12, 2023
1 parent 9f41fe9 commit a92d305
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ class Status extends EventEmitter {
this.startListeneningForRotateEvent();
} else {
// or rotate the buckets periodically
this[BUCKET_INTERVAL] = setInterval(nextBucket(this[WINDOW]), bucketInterval);
this[BUCKET_INTERVAL] = setInterval(nextBucket(this[WINDOW]),
bucketInterval);
// No unref() in the browser
if (typeof this[BUCKET_INTERVAL].unref === 'function') {
this[BUCKET_INTERVAL].unref();
Expand Down Expand Up @@ -193,13 +194,15 @@ class Status extends EventEmitter {

removeRotateBucketControllerListener () {
if (this.rotateBucketController) {
this.rotateBucketController.removeListener(this[ROTATE_EVENT_NAME], nextBucket(this[WINDOW]));
this.rotateBucketController.removeListener(this[ROTATE_EVENT_NAME],
nextBucket(this[WINDOW]));
}
}

startListeneningForRotateEvent () {
if (this.rotateBucketController) {
this.rotateBucketController.on(this[ROTATE_EVENT_NAME], nextBucket(this[WINDOW]));
this.rotateBucketController.on(this[ROTATE_EVENT_NAME],
nextBucket(this[WINDOW]));
}
}
}
Expand Down

0 comments on commit a92d305

Please sign in to comment.