Browse Source

fix(alerts): Prevent preview request from being cancelled (#51203)

Scott Cooper 1 year ago
parent
commit
a25f69bcfe
1 changed files with 3 additions and 1 deletions
  1. 3 1
      static/app/views/alerts/rules/issue/index.tsx

+ 3 - 1
static/app/views/alerts/rules/issue/index.tsx

@@ -185,11 +185,13 @@ class IssueRuleEditor extends AsyncView<Props, State> {
     return createFromDuplicate && location?.query.duplicateRuleId;
   }
 
-  UNSAFE_componentWillMount() {
+  componentDidMount() {
+    super.componentDidMount();
     this.fetchPreview();
   }
 
   componentWillUnmount() {
+    super.componentWillUnmount();
     this.isUnmounted = true;
     GroupStore.reset();
     window.clearTimeout(this.pollingTimeout);