Skip to content

Commit

Permalink
fix(AbstractUser): make isOwner return false when this.provider i…
Browse files Browse the repository at this point in the history
…s not defined
  • Loading branch information
Hans Kristian Flaatten committed Jul 5, 2016
1 parent a572a12 commit 912f6c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/AuthUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class AuthUser extends AbstractUser {
}

isOwner(doc) {
return !!doc.tilbyder && this.provider === doc.tilbyder;
return !!doc.tilbyder && !!this.provider && this.provider === doc.tilbyder;
}

can() {
Expand Down

0 comments on commit 912f6c7

Please sign in to comment.