0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-17 10:12:40 +00:00

not render snippets element if empty

This commit is contained in:
Víctor Losada Hernández
2024-10-23 20:16:30 +02:00
parent 6373c398bc
commit 88e5f26dd8
2 changed files with 21 additions and 5 deletions

View File

@@ -150,6 +150,7 @@ const Snippetbar = createClass({
renderSnippetGroups : function(){
const snippets = this.state.snippets.filter((snippetGroup)=>snippetGroup.view === this.props.view);
if(snippets.length === 0) return null;
return <div className='snippets'>
{_.map(snippets, (snippetGroup)=>{