diff --git a/CHANGELOG.md b/CHANGELOG.md index b2d7f771ad..4badc18834 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ toc: false spline: explain --- -## 🌈 1.10.3 `2024-12-25` +## 🌈 1.10.4 `2024-12-25` ### 🚀 Features - `Tree`: 支持 `onScroll` API,用于处理滚动事件回调 @HaixingOoO ([#3295](https://github.com/Tencent/tdesign-react/pull/3295)) - `Tooltip`: tooltip-lite 的`mouse` 模式下优化为完全跟随鼠标位置,更符合 API 描述 @moecasts ([#3267](https://github.com/Tencent/tdesign-react/pull/3267)) diff --git a/package.json b/package.json index 569f41963a..a64a9ce49d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "tdesign-react", "purename": "tdesign", - "version": "1.10.3", + "version": "1.10.4", "description": "TDesign Component for React", "title": "tdesign-react", "main": "lib/index.js", diff --git a/src/select/util/helper.ts b/src/select/util/helper.ts index 09a46b51cc..b69fcda2ec 100644 --- a/src/select/util/helper.ts +++ b/src/select/util/helper.ts @@ -207,14 +207,14 @@ export const getSelectedOptions = ( .map((v) => v[keys?.value || 'value']); currentOption = isObjectType ? (value as Array).find((v) => v[keys?.value || 'value'] === selectedValue) - : currentSelectedOptions.find((option) => option[keys?.value || 'value'] === selectedValue); + : currentSelectedOptions?.find((option) => option[keys?.value || 'value'] === selectedValue); } else { currentSelectedOptions = isObjectType ? [value] : tmpPropOptions?.filter?.((v) => value === v[keys?.value || 'value']) || []; currentOption = isObjectType ? value - : currentSelectedOptions.find((option) => option[keys?.value || 'value'] === selectedValue); + : currentSelectedOptions?.find((option) => option[keys?.value || 'value'] === selectedValue); } return { currentSelectedOptions, currentOption };