From 6414142f73f3c73c6226c28591ce7b2fdc4f01d8 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Mon, 12 Mar 2018 11:45:16 -0700 Subject: [PATCH] fixed check password to match check channel --- react/containers/ChannelCreateForm/view.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/react/containers/ChannelCreateForm/view.jsx b/react/containers/ChannelCreateForm/view.jsx index 01fb66f8..4db37a24 100644 --- a/react/containers/ChannelCreateForm/view.jsx +++ b/react/containers/ChannelCreateForm/view.jsx @@ -49,8 +49,7 @@ class ChannelCreateForm extends React.Component { const channelWithAtSymbol = `@${channel}`; return request(`/api/channel/availability/${channelWithAtSymbol}`); } - checkIsPasswordProvided () { - const password = this.state.password; + checkIsPasswordProvided (password) { return new Promise((resolve, reject) => { if (!password || password.length < 1) { return reject(new Error('Please provide a password')); @@ -79,9 +78,9 @@ class ChannelCreateForm extends React.Component { } createChannel (event) { event.preventDefault(); - this.checkIsPasswordProvided() + this.checkIsPasswordProvided(this.state.password) .then(() => { - return this.checkIsChannelAvailable(); + return this.checkIsChannelAvailable(this.state.channel); }) .then(() => { this.setState({status: 'We are publishing your new channel. Sit tight...'});