Skip to content

Commit 17f1097

Browse files
committed
Fix Uncaught TypeError: Cannot read property 'label' of undefined
close ant-design/ant-design#10907
1 parent 4833851 commit 17f1097

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-select",
3-
"version": "8.0.12",
3+
"version": "8.0.13",
44
"description": "React Select",
55
"keywords": [
66
"react",

src/Select.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ class Select extends React.Component {
465465
const value = preState.value;
466466
value.forEach(v => {
467467
const key = getMapKey(v);
468-
if (!optionsInfo[key]) {
468+
if (!optionsInfo[key] && oldOptionsInfo[key] !== undefined) {
469469
optionsInfo[key] = oldOptionsInfo[key];
470470
}
471471
});

0 commit comments

Comments
 (0)