|
4 | 4 | * Licensed under the MIT License. See License.txt in the project root for license information. |
5 | 5 | *--------------------------------------------------------------------------------------------*/ |
6 | 6 |
|
7 | | -import SectionHeader from "@/components/flowRunComponent/SectionHeader.jsx"; |
8 | | -import SectionContent from "@/components/flowRunComponent/SectionContent.jsx"; |
9 | | -import {v4 as uuidv4} from "uuid"; |
10 | | -import {Card} from "antd"; |
| 7 | +import SectionHeader from '@/components/flowRunComponent/SectionHeader.jsx'; |
| 8 | +import SectionContent from '@/components/flowRunComponent/SectionContent.jsx'; |
| 9 | +import {v4 as uuidv4} from 'uuid'; |
| 10 | +import {Card} from 'antd'; |
11 | 11 | import {DATA_TYPES, SECTION_TYPE, UNARY_OPERATOR, VIRTUAL_CONTEXT_NODE} from '@/common/Consts.js'; |
12 | | -import {useTranslation} from "react-i18next"; |
| 12 | +import {useTranslation} from 'react-i18next'; |
13 | 13 |
|
14 | 14 | /** |
15 | 15 | * 构造运行报告的章节 |
@@ -87,7 +87,7 @@ export default function SectionFactory({shape}) { |
87 | 87 | const rightValue = _convertRightValue(condition); |
88 | 88 | const separatorIndex = key.indexOf("."); |
89 | 89 | const referenceNodeId = key.substring(0, separatorIndex); |
90 | | - const text = referenceNodeId === VIRTUAL_CONTEXT_NODE.id ? t('systemEnv') : shape.page.getShapeById(referenceNodeId).text; |
| 90 | + const text = referenceNodeId === VIRTUAL_CONTEXT_NODE.id ? t('systemEnv') : shape.page.getShapeById(referenceNodeId)?.text ?? ''; |
91 | 91 | const newKey = text + key.substring(separatorIndex); |
92 | 92 | let isShowLogic = section.data.conditions.length > 1 && index < section.data.conditions.length - 1; |
93 | 93 | return (<div key={`condition-container-${section.no}-${uuidv4()}`} |
|
0 commit comments