Skip to content

Commit

Permalink
style: collapse #4474
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Aug 5, 2021
1 parent 093f07c commit 524cc13
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions components/vc-collapse/src/Collapse.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import openAnimationFactory from './openAnimationFactory';
import { collapseProps } from './commonProps';
import { getDataAndAriaProps } from '../../_util/util';
import { defineComponent } from 'vue';
import isNil from 'lodash/isNil';

function _toArray(activeKey) {
let currentActiveKey = activeKey;
Expand Down Expand Up @@ -79,7 +78,7 @@ export default defineComponent({
const { prefixCls, accordion, destroyInactivePanel, expandIcon } = this.$props;

// If there is no key provide, use the panel order as default key
const key = !isNil(child.key) ? String(child.key) : String(index);
const key = String(child.key ?? index);
const { header, headerClass, disabled } = getPropsData(child);
let isActive = false;

Expand Down

0 comments on commit 524cc13

Please sign in to comment.