Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Fix #3131, do not let a shot without clips break My Shots (#3133)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianb authored and jaredhirsch committed Jul 14, 2017
1 parent 3e7fcbf commit 75095a3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions server/src/pages/shotindex/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ class Card extends React.Component {
let downloadUrl = this.props.downloadUrl;
let imageUrl;
let clip = shot.clipNames().length ? shot.getClip(shot.clipNames()[0]) : null;
if (!clip) {
// Some corrupted shot, we'll have to ignore it
return null;
}
if (clip && clip.image && clip.image.url) {
imageUrl = clip.image.url;
} else if (shot.images.length) {
Expand Down

0 comments on commit 75095a3

Please sign in to comment.