fix[create]: 解决置底报错

- 为 is_remove_other 添加可选链式操作符
This commit is contained in:
Huangzhe
2025-03-23 16:50:31 +08:00
parent 35f33e7f22
commit 876f98dfab

View File

@@ -160,7 +160,7 @@ function handleChange(names) {
const options = element.value.options[0] ?? element.value.list[0];
// 如果新增的结果是排它项, 对结果进行处理
if (options[newOption - 1].is_remove_other === 1) {
if (options[newOption - 1]?.is_remove_other === 1) {
value.value = [newOption];
}
}