Skip to content

Commit

Permalink
Update Form.tsx
Browse files Browse the repository at this point in the history
修改dispatchInited方法,主要解决:当跳转到包含Form的新页面,新页面还没加载完成时,快速后退导致的报错:Uncaught (in promise) Error: [mobx-state-tree] You are trying to read or write to an object that is no longer part of a state tree.
sidrong authored Apr 23, 2024
1 parent c3bcbf2 commit 1cc4be4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/amis-core/src/renderers/Form.tsx
Original file line number Diff line number Diff line change
@@ -713,7 +713,7 @@ export default class Form extends React.Component<FormProps, object> {
async dispatchInited(value: any) {
const {data, store, dispatchEvent} = this.props;

if (store.fetching) {
if (!isAlive(store) || store.fetching) {
return value;
}

0 comments on commit 1cc4be4

Please sign in to comment.