Skip to content

Commit

Permalink
fix(antd): fix error, can't read 'length' of undefined (#3020) (#3021)
Browse files Browse the repository at this point in the history
  • Loading branch information
melodyJie authored Apr 7, 2022
1 parent 9e7a498 commit 10503b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/antd/src/preview-text/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ const Cascader: React.FC<CascaderProps> = observer((props) => {
const val = toArr(props.value)
return props.multiple
? val.map((item) => item[item.length - 1])
: val.slice(props.value.length - 1)
: val.slice(val.length - 1)
}
const getLabels = () => {
const selected = getSelected()
Expand Down

0 comments on commit 10503b8

Please sign in to comment.