Skip to content

Commit

Permalink
feat: use constant
Browse files Browse the repository at this point in the history
  • Loading branch information
Gautam Jethwani committed Sep 12, 2023
1 parent e2cb181 commit 627729d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,11 @@ class Status extends EventEmitter {
}

startListeneningForRotateEvent () {
if (this.rotateBucketController && this.rotateBucketController.listenerCount('rotate', this.rotateBucket) === 0) {
if (
this.rotateBucketController &&
this.rotateBucketController.listenerCount(this[ROTATE_EVENT_NAME],
this.rotateBucket) === 0
) {
this.rotateBucketController.on(this[ROTATE_EVENT_NAME],
this.rotateBucket);
}
Expand Down

0 comments on commit 627729d

Please sign in to comment.