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