Skip to content

Commit

Permalink
Merge pull request #10087 from sidrong/patch-1
Browse files Browse the repository at this point in the history
fix: 修复 dispatchInited 可能出现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.
  • Loading branch information
hsm-lv authored May 6, 2024
2 parents be099ea + 1cc4be4 commit 9e202bb
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
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9e202bb

Please sign in to comment.