Avoid sending join when the channels input is empty

This commit is contained in:
Ken-Håvard Lieng 2018-12-19 03:09:13 +01:00
parent 0d9290d037
commit 6aaa2b521d
2 changed files with 54 additions and 54 deletions

File diff suppressed because one or more lines are too long

View File

@ -195,7 +195,7 @@ export default withFormik({
},
handleSubmit: (values, { props }) => {
const { connect, select, join } = props;
const channels = values.channels.split(',');
const channels = values.channels ? values.channels.split(',') : [];
delete values.channels;
values.port = `${values.port}`;