Skip to content

Commit

Permalink
Merge branch 'next' of github.com:vueComponent/ant-design-vue into next
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Feb 6, 2021
2 parents 638ccb3 + ae41fa1 commit 57b9ac1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/vc-menu/MenuItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ const MenuItem = defineComponent({
setup(props) {
const uniKey = `menu_item_${++indexGuid}`;
const store = inject('menuStore', () => ({}));
const isSelected = computed(() => store.selectedKeys.indexOf(props.eventKey) !== -1);
const isSelected = computed(
() => store.selectedKeys && store.selectedKeys.indexOf(props.eventKey) !== -1,
);
onMounted(() => {
store.addChildrenInfo(
uniKey,
Expand Down

0 comments on commit 57b9ac1

Please sign in to comment.