diff --git a/packages/amis-core/src/RootRenderer.tsx b/packages/amis-core/src/RootRenderer.tsx index 7b5967af0..b271f461c 100644 --- a/packages/amis-core/src/RootRenderer.tsx +++ b/packages/amis-core/src/RootRenderer.tsx @@ -74,10 +74,6 @@ export class RootRenderer extends React.Component { componentDidUpdate(prevProps: RootRendererProps) { const props = this.props; - if (props.data !== prevProps.data) { - this.store.initData(props.data); - } - if (props.location !== prevProps.location) { this.store.updateLocation(props.location, this.props.env?.parseLocation); } @@ -85,6 +81,10 @@ export class RootRenderer extends React.Component { if (props.context !== prevProps.context) { this.store.updateContext(props.context); } + + if (props.data !== prevProps.data) { + this.store.initData(props.data); + } } componentDidCatch(error: any, errorInfo: any) {