Browse Source

fix(InstallWizard): Fix exception when InstallWizard completed (#14092)

Since we don't have tests for the submit flow, we did not catch a regression from #13798 where the event handler was not bound to the class instance, causing an `this.setState` is not defined error when submitting the welcome form.

This patch fixes the issue. Will add tests to cover this soon after.
Burak Yigit Kaya 5 years ago
parent
commit
cbc7b9632d
1 changed files with 3 additions and 6 deletions
  1. 3 6
      src/sentry/static/sentry/app/views/app.jsx

+ 3 - 6
src/sentry/static/sentry/app/views/app.jsx

@@ -200,16 +200,13 @@ class App extends React.Component {
     e.stopPropagation();
   }
 
-  onConfigured() {
-    this.setState({needsUpgrade: false});
-  }
+  onConfigured = () => this.setState({needsUpgrade: false});
 
-  handleNewsletterConsent = () => {
-    // this is somewhat hackish
+  // this is somewhat hackish
+  handleNewsletterConsent = () =>
     this.setState({
       newsletterConsentPrompt: false,
     });
-  };
 
   handleGlobalModalClose = () => {
     if (!this.mainContainerRef) {