trim whitespace when adding to list

This commit is contained in:
Matthew Hodgson 2016-09-17 16:14:02 +01:00
parent da85df9d1a
commit 6e57faecb0

View file

@ -142,7 +142,7 @@ module.exports = React.createClass({
var check = Invite.isValidAddress(this.refs.textinput.value); var check = Invite.isValidAddress(this.refs.textinput.value);
if (check === true || check === null) { if (check === true || check === null) {
var inviteList = this.state.inviteList.slice(); var inviteList = this.state.inviteList.slice();
inviteList.push(this.refs.textinput.value); inviteList.push(this.refs.textinput.value.trim());
this.setState({ this.setState({
inviteList: inviteList, inviteList: inviteList,
queryList: [], queryList: [],