client/src/components/CreateSession.js
changeset 168 ea92f4fe783d
parent 167 1f340f3597a8
child 171 03334a31130a
--- a/client/src/components/CreateSession.js	Tue Oct 09 19:07:47 2018 +0200
+++ b/client/src/components/CreateSession.js	Mon Oct 08 18:35:47 2018 +0200
@@ -9,7 +9,7 @@
 
   static propTypes = {
     history: PropTypes.object.isRequired,
-    group: PropTypes.object.isRequired,
+    group: PropTypes.object,
     createSession: PropTypes.func.isRequired,
   };
 
@@ -31,8 +31,8 @@
 
   createSession = () => {
     const sessionId = uuidV1();
-    const groupName = this.props.group ? this.props.group.get('name') : null;
-    const protocol = this.props.group ? this.props.group.get('protocol') : null;
+    const groupName = this.props.group ? this.props.group.name : null;
+    const protocol = this.props.group ? this.props.group.protocol : null;
     const {title, description} = this.state;
 
     this.props.createSession(sessionId, groupName, protocol, title, description);