Fix bug when there is no group.
--- a/client/src/components/SessionForm.js Thu Jun 29 12:05:09 2017 +0200
+++ b/client/src/components/SessionForm.js Thu Jun 29 12:06:48 2017 +0200
@@ -126,7 +126,7 @@
<FormControl
name="group"
componentClass="select"
- value={ this.props.group.id }
+ value={ this.props.group ? this.props.group.id : '' }
onChange={ this.onGroupChange }
inputRef={ ref => { this.group = ref; } }>
<option />
@@ -147,7 +147,7 @@
function mapStateToProps(state, props) {
let group;
- if (props.session) {
+ if (props.session && props.session.group) {
group = state.groups.find(group => props.session.group.get('id') === group.id)
}