Skip to content

Commit

Permalink
made UI immune to lack of buttons array
Browse files Browse the repository at this point in the history
  • Loading branch information
klavins committed Mar 7, 2020
1 parent 8c6f0d5 commit 66565bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/src/enviro.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,14 @@ class Taskbar extends React.Component {
}

render() {
let buttons = this.props.buttons;
if ( !buttons ) {
buttons = [];
}
return <div id="title-container">
<span id="title">ENVIRO: {this.props.name}</span>
<div className="buttons">
{this.props.buttons.map(button =>
{buttons.map(button =>
<button key={button.label}
className='action-button'
style={button.style}
Expand Down

0 comments on commit 66565bf

Please sign in to comment.