Skip to content

Commit

Permalink
Change #54 to use an early return
Browse files Browse the repository at this point in the history
  • Loading branch information
azigler committed Jun 6, 2020
1 parent 021ea21 commit bc2bddb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Character.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,10 @@ class Character extends Metadatable(EventEmitter) {
* @fires Character#unfollowed
*/
unfollow() {
if (!this.following) {
return
}

this.following.removeFollower(this);
/**
* @event Character#unfollowed
Expand Down

0 comments on commit bc2bddb

Please sign in to comment.