Fix state setting on subscriber modal unmount

This commit is contained in:
Kailash Nadh 2018-12-19 11:53:45 +05:30
parent b461f51275
commit 72cf9e2d9b
1 changed files with 0 additions and 2 deletions

View File

@ -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 })