fix: executeLifeCycleMethod return bug in renderer

This commit is contained in:
owenchen1004 2023-11-28 10:50:38 +08:00
parent d64c7d56df
commit f75b9ae61c

View File

@ -182,7 +182,7 @@ export default function baseRendererFactory(): IBaseRenderComponent {
__afterInit(_props: IBaseRendererProps) { } __afterInit(_props: IBaseRendererProps) { }
static getDerivedStateFromProps(props: IBaseRendererProps, state: any) { static getDerivedStateFromProps(props: IBaseRendererProps, state: any) {
return executeLifeCycleMethod(this, props?.__schema, 'getDerivedStateFromProps', [props, state], props.thisRequiredInJSE); return executeLifeCycleMethod(this, props?.__schema, 'getDerivedStateFromProps', [props, state], props.thisRequiredInJSE) || null;
} }
async getSnapshotBeforeUpdate(...args: any[]) { async getSnapshotBeforeUpdate(...args: any[]) {