mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-29 05:29:37 +08:00
Merge pull request #18190 from nnecec/master
fix(Cascader): check if options exists before use options.length
This commit is contained in:
commit
03189b3ba2
@ -496,7 +496,7 @@ class Cascader extends React.Component<CascaderProps, CascaderState> {
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
let { options } = props;
|
let { options } = props;
|
||||||
if (options.length > 0) {
|
if (options && options.length > 0) {
|
||||||
if (state.inputValue) {
|
if (state.inputValue) {
|
||||||
options = this.generateFilteredOptions(prefixCls, renderEmpty);
|
options = this.generateFilteredOptions(prefixCls, renderEmpty);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user