diff --git a/packages/components/select/src/useSelect.ts b/packages/components/select/src/useSelect.ts index dad32e613f..010981c38a 100644 --- a/packages/components/select/src/useSelect.ts +++ b/packages/components/select/src/useSelect.ts @@ -589,7 +589,8 @@ export const useSelect = (props: ISelectProps, emit) => { } const getValueIndex = (arr: any[] = [], option) => { - if (!isObject(option?.value)) return arr.indexOf(option.value) + if (isUndefined(option)) return -1 + if (!isObject(option.value)) return arr.indexOf(option.value) return arr.findIndex((item) => { return isEqual(get(item, props.valueKey), getValueKey(option))