Skip to content

Commit

Permalink
chore: simplify a line of code (#22352)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed May 20, 2024
1 parent 3f0de94 commit 1bded42
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -561,11 +561,7 @@ export const sessionRecordingsPlaylistLogic = kea<sessionRecordingsPlaylistLogic
activeSessionRecordingId: [
(s) => [s.selectedRecordingId, s.recordings, (_, props) => props.autoPlay],
(selectedRecordingId, recordings, autoPlay): SessionRecordingId | undefined => {
return selectedRecordingId
? recordings.find((rec) => rec.id === selectedRecordingId)?.id || selectedRecordingId
: autoPlay
? recordings[0]?.id
: undefined
return selectedRecordingId ? selectedRecordingId : autoPlay ? recordings[0]?.id : undefined
},
],

Expand Down

0 comments on commit 1bded42

Please sign in to comment.