Skip to content

Commit

Permalink
fixed playback speeds when user is nil (#1400)
Browse files Browse the repository at this point in the history
  • Loading branch information
karjo24 authored Nov 12, 2024
1 parent 7364d47 commit 4dda857
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions model/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ func (s PlaybackSpeedSettings) GetEnabled() (res []float32) {
}

func (u *User) GetEnabledPlaybackSpeeds() (res []float32) {
if u == nil {
return []float32{1}
}
// Possibly, this could be collapsed into a single line, but readibility suffers.
res = append(res, u.GetPlaybackSpeeds().GetEnabled()...)
res = append(res, u.GetCustomSpeeds()...)
Expand Down

0 comments on commit 4dda857

Please sign in to comment.