Skip to content

Commit

Permalink
[#3860] Defensive check on file duration, which might occur when file…
Browse files Browse the repository at this point in the history
… upload fails
  • Loading branch information
bjester committed Dec 2, 2022
1 parent b714641 commit 8bee2fd
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -705,10 +705,11 @@
audioVideoFiles = this.nodeFiles.filter(file => this.allowedFileType(file));
// return the last item in the array
const file = audioVideoFiles[audioVideoFiles.length - 1];
return file.duration;
} else {
return null;
if (file) {
return file.duration;
}
}
return null;
},
videoSelected() {
return this.oneSelected && this.firstNode.kind === ContentKindsNames.VIDEO;
Expand Down

0 comments on commit 8bee2fd

Please sign in to comment.