Remove componentWillReceiveProps from newsletter send

[MAILPOET-2133]
This commit is contained in:
Pavel Dohnal
2019-06-26 10:23:34 +02:00
committed by M. Shull
parent aa5547c4f2
commit 20c75d8461

View File

@@ -49,10 +49,12 @@ const NewsletterSend = createReactClass({ // eslint-disable-line react/prefer-es
jQuery('#mailpoet_newsletter').parsley();
},
componentWillReceiveProps: function componentWillReceiveProps(props) {
this.loadItem(props.match.params.id).always(() => {
this.setState({ loading: false });
});
componentDidUpdate: function componentDidUpdate(prevProps) {
if (this.props.match.params.id !== prevProps.match.params.id) {
this.loadItem(this.props.match.params.id).always(() => {
this.setState({ loading: false });
});
}
},
getFieldsByNewsletter: function getFieldsByNewsletter(newsletter) {