Skip to content

Commit 66565bf

Browse files
committed
made UI immune to lack of buttons array
1 parent 8c6f0d5 commit 66565bf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

client/src/enviro.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,14 @@ class Taskbar extends React.Component {
120120
}
121121

122122
render() {
123+
let buttons = this.props.buttons;
124+
if ( !buttons ) {
125+
buttons = [];
126+
}
123127
return <div id="title-container">
124128
<span id="title">ENVIRO: {this.props.name}</span>
125129
<div className="buttons">
126-
{this.props.buttons.map(button =>
130+
{buttons.map(button =>
127131
<button key={button.label}
128132
className='action-button'
129133
style={button.style}

0 commit comments

Comments
 (0)