diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-07-18 15:45:23 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-07-18 15:45:23 -0700 |
commit | 97f34e483b0fa8b2a8cfe75b72168cfa38cc9d80 (patch) | |
tree | ec2d68077dd2b12de3173871622f3ec2a2b61d35 /webapp/components/integrations | |
parent | 21a3219b9b1df033635631afa751742bd4c56ea0 (diff) | |
parent | a350f4dc0754e1aeabb64bd712ce05f7c59cfa60 (diff) | |
download | chat-97f34e483b0fa8b2a8cfe75b72168cfa38cc9d80.tar.gz chat-97f34e483b0fa8b2a8cfe75b72168cfa38cc9d80.tar.bz2 chat-97f34e483b0fa8b2a8cfe75b72168cfa38cc9d80.zip |
Merge branch 'release-4.0'
Diffstat (limited to 'webapp/components/integrations')
-rw-r--r-- | webapp/components/integrations/components/edit_incoming_webhook.jsx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/webapp/components/integrations/components/edit_incoming_webhook.jsx b/webapp/components/integrations/components/edit_incoming_webhook.jsx index 5a6309212..00cb50cbd 100644 --- a/webapp/components/integrations/components/edit_incoming_webhook.jsx +++ b/webapp/components/integrations/components/edit_incoming_webhook.jsx @@ -31,13 +31,11 @@ export default class EditIncomingWebhook extends AbstractIncomingWebhook { handleIntegrationChange() { const teamId = TeamStore.getCurrentId(); - this.setState({ - hooks: IntegrationStore.getIncomingWebhooks(teamId), - loading: !IntegrationStore.hasReceivedIncomingWebhooks(teamId) - }); + const hooks = IntegrationStore.getIncomingWebhooks(teamId); + const loading = !IntegrationStore.hasReceivedIncomingWebhooks(teamId); - if (!this.state.loading) { - this.originalIncomingHook = this.state.hooks.filter((hook) => hook.id === this.props.location.query.id)[0]; + if (!loading) { + this.originalIncomingHook = hooks.filter((hook) => hook.id === this.props.location.query.id)[0]; this.setState({ displayName: this.originalIncomingHook.display_name, |