Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private $_getClonedVNodes() {
const h = this.$createElement;
const cloneCount = this.$_nativeFlicking
? this.$_nativeFlicking.getCloneCount()
: 0;
const lastIndex = this.$_nativeFlicking
? this.$_nativeFlicking.getLastIndex()
: this.options.lastIndex || DEFAULT_OPTIONS.lastIndex;
const slots = this.$_getSlots();
const children = slots.slice(0, lastIndex + 1);
const clones: VNode[] = [];
for (let cloneIndex = 0; cloneIndex < cloneCount; cloneIndex++) {
clones.push(...children.map((child, childIdx) => this.$_cloneVNode(child, h, cloneIndex, childIdx)));
}
return clones;
}