소스 검색

Fix state setting on subscriber modal unmount

Kailash Nadh 6 년 전
부모
커밋
72cf9e2d9b
1개의 변경된 파일0개의 추가작업 그리고 2개의 파일을 삭제
  1. 0 2
      frontend/my/src/Subscribers.js

+ 0 - 2
frontend/my/src/Subscribers.js

@@ -59,7 +59,6 @@ class CreateFormDef extends React.PureComponent {
                 notification["success"]({ message: "Subscriber added", description: `${values["email"]} added` })
                 this.props.fetchRecords()
                 this.props.onClose()
-                this.setState({ modalWaiting: false })
             }).catch(e => {
                 notification["error"]({ message: "Error", description: e.message })
                 this.setState({ modalWaiting: false })
@@ -74,7 +73,6 @@ class CreateFormDef extends React.PureComponent {
                 // Reload the table.
                 this.props.fetchRecords()
                 this.props.onClose()
-                this.setState({ modalWaiting: false })
             }).catch(e => {
                 notification["error"]({ message: "Error", description: e.message })
                 this.setState({ modalWaiting: false })