Skip to content

Commit

Permalink
Fix weird bug in card.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
skvrahul committed May 25, 2020
1 parent 51e3889 commit d28e65d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function App() {
const renderUdaipurClient = () => {
return <UdaipurClient playerID="0"></UdaipurClient>;
};
if (isMobile) {
if (isMobile && APP_PRODUCTION) {
return <MobileCover />;
}
return (
Expand Down
9 changes: 7 additions & 2 deletions src/components/card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ class Card extends Component {
};
render() {
let tooltip_text = null;
if (Object.values(RESOURCES).includes(this.props.card.type)) {
tooltip_text = this.props.card.type;
const card = this.props.card;
if (
card &&
Object.values(RESOURCES).includes(card.type) &&
this.props.faceUp
) {
tooltip_text = card.type;
}
return (
<div
Expand Down

0 comments on commit d28e65d

Please sign in to comment.