fix: 修复由于过滤逻辑导致的过滤问题,优化多选配置项验证逻辑,确保选项数组不为空
This commit is contained in:
parent
b271da3ca8
commit
b6e0d524a1
@ -691,7 +691,7 @@ const validateAndFilterConfig = () => {
|
||||
}
|
||||
|
||||
// 检查多选配置项 (type === 'list' 且有 options)
|
||||
else if (configItem.type === 'list' && configItem.options && Array.isArray(currentValue)) {
|
||||
else if (configItem.type === 'list' && configItem.options.length > 0 && Array.isArray(currentValue)) {
|
||||
const validOptions = configItem.options
|
||||
validatedConfig[key] = currentValue.filter((value) => validOptions.includes(value))
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user