File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,6 @@ export default React.createClass({
84
84
renderCrew ( mission ) {
85
85
const crew = mission . crew ;
86
86
87
- if ( _ . isEmpty ( crew ) ) return null ;
88
-
89
87
const addMember = ( ) => {
90
88
crew . push ( { status : 'none' , volunteer : _ . uniqueId ( ) } ) ;
91
89
this . setState ( { mission } ) ;
@@ -104,7 +102,7 @@ export default React.createClass({
104
102
} ;
105
103
106
104
return (
107
- < Table style = { { tableLayout : 'fixed' } } >
105
+ < Table style = { { tableLayout : 'fixed' , marginBottom : '1rem' } } >
108
106
< thead >
109
107
< tr >
110
108
< th > Status</ th > < th > Group</ th > < th > Name (Einsätze)</ th >
@@ -131,7 +129,10 @@ export default React.createClass({
131
129
render ( ) {
132
130
const mission = this . state . mission ;
133
131
const getOption = v => ( { value : v . id , label : `${ v . name . first || '' } ${ v . name . last || '' } ` } ) ;
134
- const currentVolunteers = mission . crew . map ( a => getOption ( this . context . volunteers [ a . volunteer ] ) ) ;
132
+ const currentVolunteers = mission . crew
133
+ . map ( a => this . context . volunteers [ a . volunteer ] )
134
+ . filter ( Boolean ) // remove unfinished selections
135
+ . map ( getOption ) ;
135
136
136
137
return (
137
138
< div >
You can’t perform that action at this time.
0 commit comments