refactor(Survey): 修复 Analysis 组件中的选项显示逻辑
- 在 AnalysisInfo 组件中,增加了对 option 数组长度的判断- 确保在 option 数组为空时,不会尝试访问第一个
This commit is contained in:
@@ -50,7 +50,7 @@ const getTableHeadProps = (values: any[], option) => {
|
||||
}
|
||||
});
|
||||
}
|
||||
if (option && option[0].option) {
|
||||
if (option && option.length > 0 && option[0].option) {
|
||||
head.unshift({
|
||||
label: '选项',
|
||||
prop: 'option',
|
||||
|
||||
Reference in New Issue
Block a user