From e752cc8557754afb1a652cdc81fb49ba1351a972 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Wed, 28 Jun 2017 12:32:38 +0100 Subject: [PATCH] Use 'this' in preference to local reference. --- src/components/views/rooms/AppsDrawer.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/AppsDrawer.js b/src/components/views/rooms/AppsDrawer.js index 202d1c0018..ce414b2ea0 100644 --- a/src/components/views/rooms/AppsDrawer.js +++ b/src/components/views/rooms/AppsDrawer.js @@ -40,13 +40,12 @@ module.exports = React.createClass({ componentDidMount: function() { this.scalarClient = null; - const appsDrawer = this; if (SdkConfig.get().integrations_ui_url && SdkConfig.get().integrations_rest_url) { this.scalarClient = new ScalarAuthClient(); this.scalarClient.connect().done(() => { this.forceUpdate(); - if (appsDrawer.state.apps && appsDrawer.state.apps.length < 1) { - appsDrawer.onClickAddWidget(); + if (this.state.apps && this.state.apps.length < 1) { + this.onClickAddWidget(); } }, (err) => { this.setState({