Fix a bug with the adding of teams to groups
Due to the equals one could fill up one group, decrease the max size of it and then add indefinitely many teams to the last group without a new group being created.
This commit is contained in:
parent
e50dc7d293
commit
6890ecc7fb
|
|
@ -30,7 +30,7 @@ export default class EditableStringList extends React.Component {
|
|||
this.state.teams.push(text);
|
||||
|
||||
var lastGroup = this.state.groups[this.state.groups.length - 1];
|
||||
if(lastGroup === undefined || lastGroup.length === this.props.groupSize) {
|
||||
if(lastGroup === undefined || lastGroup.length >= this.props.groupSize) {
|
||||
this.state.groups[this.state.groups.length] = [];
|
||||
}
|
||||
lastGroup = this.state.groups[this.state.groups.length - 1];
|
||||
|
|
|
|||
Loading…
Reference in New Issue