0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Fix no systems/tags/authors mesasges

This commit is contained in:
G.Ambatte
2023-04-09 21:40:41 +12:00
parent d5dbf46fc4
commit 14ac098882

View File

@@ -29,12 +29,12 @@ const MetadataNav = createClass({
},
getAuthors : function(){
if(!this.props.brew.authors) return 'No authors';
if(!this.props.brew.authors || this.props.brew.authors.length == 0) return 'No authors';
return this.props.brew.authors.join(', ');
},
getTags : function(){
if(this.props.brew.tags.length == 0) return 'No tags';
if(!this.props.brew.tags || this.props.brew.tags.length == 0) return 'No tags';
return <>
{this.props.brew.tags.map((tag, idx)=>{
return <span className='tag' key={idx}>{tag}</span>;
@@ -43,7 +43,7 @@ const MetadataNav = createClass({
},
getSystems : function(){
if(!this.props.brew.systems) return 'No systems';
if(!this.props.brew.systems || this.props.brew.systems.length == 0) return 'No systems';
return this.props.brew.systems.join(', ');
},