mirror of
https://github.com/chaoticbackup/chaoticbackup.github.io.git
synced 2026-03-21 17:24:14 -05:00
fixed rendering bug with non exisiting cards
This commit is contained in:
parent
1961edd7b7
commit
ccad64bc23
|
|
@ -47,13 +47,12 @@ export default class SingleAttack extends React.Component {
|
|||
/>
|
||||
);
|
||||
}
|
||||
else {
|
||||
else if (card_data) {
|
||||
if (card_data.gsx$splash) {
|
||||
return (<Single card={card_data}/>);
|
||||
}
|
||||
else {
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
}
|
||||
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ export default class SingleBattlegear extends React.Component {
|
|||
const battlegear = API.portal.battlegear.findOne({'gsx$name': name});
|
||||
const card_data = API.cards.battlegear.findOne({'gsx$name': name});
|
||||
|
||||
|
||||
if (battlegear) {
|
||||
return (<Single
|
||||
card={card_data}
|
||||
|
|
@ -51,12 +50,8 @@ export default class SingleBattlegear extends React.Component {
|
|||
if (card_data.gsx$splash) {
|
||||
return (<Single card={card_data}/>);
|
||||
}
|
||||
else {
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
}
|
||||
else {
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ export default class SingleLocation extends React.Component {
|
|||
</React.Fragment>}
|
||||
/>);
|
||||
}
|
||||
else {
|
||||
else if (card_data) {
|
||||
if (card_data.gsx$splash) {
|
||||
return (<Single
|
||||
card={card_data}
|
||||
|
|
@ -61,9 +61,8 @@ export default class SingleLocation extends React.Component {
|
|||
</React.Fragment>}
|
||||
/>);
|
||||
}
|
||||
else {
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
}
|
||||
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ export default class SingleMugic extends React.Component {
|
|||
</React.Fragment>}
|
||||
/>);
|
||||
}
|
||||
else {
|
||||
else if (card_data) {
|
||||
if (card_data.gsx$splash) {
|
||||
return (<Single
|
||||
card={card_data}
|
||||
|
|
@ -85,9 +85,8 @@ export default class SingleMugic extends React.Component {
|
|||
</React.Fragment>}
|
||||
/>);
|
||||
}
|
||||
else {
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
}
|
||||
|
||||
return(<PageNotFound location={this.props.location}/>);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user