Skip to content

Commit

Permalink
fix(Cascader): 兼容不存在option导致的组件报错 (#2074)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonwong666 authored Dec 12, 2024
1 parent 1d12f6a commit d17fd67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/zent/src/cascader/components/MenuContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class MenuContent extends Component<IMenuContentProps> {
const parent = options.find(it => it.value === value[i]);
options = getNodeChildren(options, value[i]);

if (options.length > 0) {
if (options?.length > 0) {
PanelEls.push(this.renderCascaderItems(options, level, parent));
}
}
Expand Down

0 comments on commit d17fd67

Please sign in to comment.