Merge pull request #2705 from owenchen1004/main

fix: executeLifeCycleMethod return bug in renderer
This commit is contained in:
唐澜 2023-11-28 11:21:21 +08:00 committed by GitHub
commit a8051aefc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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[]) {