mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 20:18:03 +08:00
修复一个报错
This commit is contained in:
parent
2c98759fda
commit
25a65eff55
@ -71,6 +71,7 @@ export default class Dialog extends React.Component<DialogProps, DialogState> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
reaction: any;
|
reaction: any;
|
||||||
|
isDead = false;
|
||||||
$$id: string = guid();
|
$$id: string = guid();
|
||||||
constructor(props: DialogProps) {
|
constructor(props: DialogProps) {
|
||||||
super(props);
|
super(props);
|
||||||
@ -114,6 +115,7 @@ export default class Dialog extends React.Component<DialogProps, DialogState> {
|
|||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
this.reaction && this.reaction();
|
this.reaction && this.reaction();
|
||||||
|
this.isDead = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
buildActions(): Array<Action> {
|
buildActions(): Array<Action> {
|
||||||
@ -586,6 +588,9 @@ export class DialogRenderer extends Dialog {
|
|||||||
store.markBusying(false);
|
store.markBusying(false);
|
||||||
})
|
})
|
||||||
.catch(reason => {
|
.catch(reason => {
|
||||||
|
if (this.isDead) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
store.updateMessage(reason.message, true);
|
store.updateMessage(reason.message, true);
|
||||||
store.markBusying(false);
|
store.markBusying(false);
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user