mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 11:07:52 +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;
|
||||
isDead = false;
|
||||
$$id: string = guid();
|
||||
constructor(props: DialogProps) {
|
||||
super(props);
|
||||
@ -114,6 +115,7 @@ export default class Dialog extends React.Component<DialogProps, DialogState> {
|
||||
|
||||
componentWillUnmount() {
|
||||
this.reaction && this.reaction();
|
||||
this.isDead = true;
|
||||
}
|
||||
|
||||
buildActions(): Array<Action> {
|
||||
@ -586,6 +588,9 @@ export class DialogRenderer extends Dialog {
|
||||
store.markBusying(false);
|
||||
})
|
||||
.catch(reason => {
|
||||
if (this.isDead) {
|
||||
return;
|
||||
}
|
||||
store.updateMessage(reason.message, true);
|
||||
store.markBusying(false);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user