Skip to content

Commit

Permalink
handle undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
an-lee committed Mar 28, 2024
1 parent bdc3865 commit 2bea14f
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ export const MediaCurrentRecording = (props: { height?: number }) => {
* with the original pitch contour.
*/
const renderComparingPitchContour = () => {
if (!currentRecording) return;

const region = mediaRegions
.getRegions()
.find((r) => r.id.startsWith("segment-region"));
Expand Down Expand Up @@ -171,6 +173,8 @@ export const MediaCurrentRecording = (props: { height?: number }) => {
};

const handleShare = async () => {
if (!currentRecording) return;

if (!currentRecording.uploadedAt) {
try {
await EnjoyApp.recordings.upload(currentRecording.id);
Expand Down

0 comments on commit 2bea14f

Please sign in to comment.