mirror of
https://github.com/openharmony/developtools_ace-ets2bundle.git
synced 2026-07-21 03:55:23 -04:00
Bugfix: fixed hasChild validate
Signed-off-by: laibo102 <laibo2@huawei.com> Change-Id: I932616545bcba538c5ac8984ae6ff3a24495c814
This commit is contained in:
@@ -390,9 +390,9 @@ function checkNoChildComponent(node: ts.EtsComponentExpression, sourceFileNode:
|
||||
}
|
||||
|
||||
function hasChild(node: ts.EtsComponentExpression, isCheckType: ParamType): boolean {
|
||||
const nodeName: ts.Identifier = node.expression as ts.Identifier;
|
||||
if (AUTOMIC_COMPONENT.has(nodeName.escapedText.toString()) || judgeComponentType(
|
||||
nodeName, node, isCheckType) && getNextNode(node)) {
|
||||
const nodeName: ts.Identifier = node.expression as ts.Identifier;
|
||||
if ((AUTOMIC_COMPONENT.has(nodeName.escapedText.toString()) || judgeComponentType(nodeName, node, isCheckType)) &&
|
||||
getNextNode(node)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -447,8 +447,8 @@ function hasNonSingleChild(node: ts.EtsComponentExpression, allComponentNames: S
|
||||
isCheckType: ParamType): boolean {
|
||||
const nodeName: ts.Identifier = node.expression as ts.Identifier;
|
||||
const BlockNode: ts.Block = getNextNode(node);
|
||||
if (SINGLE_CHILD_COMPONENT.has(nodeName.escapedText.toString()) || !judgeComponentType(
|
||||
nodeName, node, isCheckType) && isCheckType.value === COMPONENT_BUTTON) {
|
||||
if ((SINGLE_CHILD_COMPONENT.has(nodeName.escapedText.toString()) || !judgeComponentType(nodeName, node, isCheckType))
|
||||
&& isCheckType.value === COMPONENT_BUTTON) {
|
||||
if (!BlockNode) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user