Skip to content

Commit

Permalink
guard against hitting for a URL before we get the auth token
Browse files Browse the repository at this point in the history
  • Loading branch information
3ll3d00d committed Jun 9, 2019
1 parent 9afb0c4 commit 6c09983
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ httpRequests/

.vscode/

ezmote-*.tar.gz
ezmote-*.tar.gz
.yarnrc
13 changes: 9 additions & 4 deletions src/scenes/control/jriver/PlayableCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,15 @@ const PlayableCard = ({mcwsUrl, type, name, id, width, height, onSelect, fallbac
}
</div>
</div>
<CardMedia className={classes.cover}
image={getImgUrl(mcwsUrl, type, id, width, height, fallbackColour, authToken)}
component='img'
title={name}/>
{
authToken
?
<CardMedia className={classes.cover}
image={getImgUrl(mcwsUrl, type, id, width, height, fallbackColour, authToken)}
component='img'
title={name}/>
: null
}
</Card>
);
};
Expand Down

0 comments on commit 6c09983

Please sign in to comment.