mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-11 18:42:56 +00:00
fix: 修复 lifeCycles 无法正常出码
This commit is contained in:
parent
da7ff59066
commit
62289e5995
@ -13,6 +13,7 @@ import {
|
|||||||
IContainerInfo,
|
IContainerInfo,
|
||||||
} from '../../../types';
|
} from '../../../types';
|
||||||
import { isJSFunction, isJSExpression } from '@alilc/lowcode-types';
|
import { isJSFunction, isJSExpression } from '@alilc/lowcode-types';
|
||||||
|
import { isJSExpressionFn } from '../../../utils/common';
|
||||||
|
|
||||||
export interface PluginConfig {
|
export interface PluginConfig {
|
||||||
fileType: string;
|
fileType: string;
|
||||||
@ -41,6 +42,7 @@ const pluginFactory: BuilderComponentPluginFactory<PluginConfig> = (config?) =>
|
|||||||
// 过滤掉非法数据(有些场景下会误传入空字符串或 null)
|
// 过滤掉非法数据(有些场景下会误传入空字符串或 null)
|
||||||
if (
|
if (
|
||||||
!isJSFunction(lifeCycles[lifeCycleName]) &&
|
!isJSFunction(lifeCycles[lifeCycleName]) &&
|
||||||
|
!isJSExpressionFn(lifeCycles[lifeCycleName]) &&
|
||||||
!isJSExpression(lifeCycles[lifeCycleName])
|
!isJSExpression(lifeCycles[lifeCycleName])
|
||||||
) {
|
) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user