fix: do not crash when not logged in
This commit is contained in:
parent
454803a062
commit
52231280db
|
@ -54,7 +54,7 @@ class Track extends mongoose.Model {
|
|||
}
|
||||
|
||||
isVisibleToPrivate(user) {
|
||||
return user._id.equals(this.author._id);
|
||||
return user && user._id.equals(this.author._id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue