Skip to content

Commit

Permalink
Merge pull request #2705 from owenchen1004/main
Browse files Browse the repository at this point in the history
fix: executeLifeCycleMethod return bug in renderer
  • Loading branch information
1ncounter authored Nov 28, 2023
2 parents d41f2c1 + b786c8f commit a8051ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/renderer-core/src/renderer/base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ export default function baseRendererFactory(): IBaseRenderComponent {
__afterInit(_props: IBaseRendererProps) { }

static getDerivedStateFromProps(props: IBaseRendererProps, state: any) {
return executeLifeCycleMethod(this, props?.__schema, 'getDerivedStateFromProps', [props, state], props.thisRequiredInJSE);
const result = executeLifeCycleMethod(this, props?.__schema, 'getDerivedStateFromProps', [props, state], props.thisRequiredInJSE);
return result === undefined ? null : result;
}

async getSnapshotBeforeUpdate(...args: any[]) {
Expand Down

0 comments on commit a8051ae

Please sign in to comment.