Skip to content

Commit 524cc13

Browse files
committed
style: collapse #4474
1 parent 093f07c commit 524cc13

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

components/vc-collapse/src/Collapse.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import openAnimationFactory from './openAnimationFactory';
1111
import { collapseProps } from './commonProps';
1212
import { getDataAndAriaProps } from '../../_util/util';
1313
import { defineComponent } from 'vue';
14-
import isNil from 'lodash/isNil';
1514

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

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

0 commit comments

Comments
 (0)