|
|
@@ -23,6 +23,7 @@ class TencentDeploy extends Component {
|
|
|
}
|
|
|
|
|
|
componentWillMount() {
|
|
|
+ this._isMounted = true;
|
|
|
let {userID} = this.state;
|
|
|
if (userID !== 'demo') {
|
|
|
request(graphqlUrl, SHOW_APIGROUP, {userID}).then(res => {
|
|
|
@@ -30,14 +31,20 @@ class TencentDeploy extends Component {
|
|
|
let deployed = allDeployed.filter(deployed =>
|
|
|
deployed.cloud_id.cloudName === 'aliyun'
|
|
|
);
|
|
|
- this.setState({
|
|
|
- deployed,
|
|
|
- show: true
|
|
|
- })
|
|
|
+ if(this._isMounted) {
|
|
|
+ this.setState({
|
|
|
+ deployed,
|
|
|
+ show: true
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ componentWillUnmount() {
|
|
|
+ this._isMounted = false;
|
|
|
+ }
|
|
|
+
|
|
|
render() {
|
|
|
let {userID, url, deployed, show} = this.state;
|
|
|
return (
|