fix(Track): fix toJSON causing errors

This commit is contained in:
Andromeda 2021-09-21 10:39:56 +05:45 committed by GitHub
parent c681d0b151
commit ad9212c0e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -173,7 +173,7 @@ class Track {
duration: this.duration, duration: this.duration,
durationMS: this.durationMS, durationMS: this.durationMS,
views: this.views, views: this.views,
requestedBy: this.requestedBy.id, requestedBy: this.requestedBy?.id,
playlist: hidePlaylist ? null : this.playlist?.toJSON() ?? null playlist: hidePlaylist ? null : this.playlist?.toJSON() ?? null
} as TrackJSON; } as TrackJSON;
} }