Skip to content

Commit 705fb32

Browse files
beljandowen-m1
authored andcommitted
Fixed missing forEach indexes + Fixed CircleCI Config
1 parent caf3e12 commit 705fb32

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.circleci/config.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ jobs:
2121
- run: npm run build:umd
2222

2323
- run:
24-
name: Compatibility Test
25-
command: |
26-
if [ -z "$CIRCLE_PR_NUMBER" ]; then
27-
npm run test:compat
28-
fi
24+
name: Compatibility Test
25+
command: |
26+
if [ -z "$CIRCLE_PR_NUMBER" ];
27+
then
28+
npm run test:compat
29+
fi
2930
- run: npm run test
3031

3132
- store_test_results:

plugins/MultiDrag/MultiDrag.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ function MultiDragPlugin() {
580580
}
581581

582582
function insertMultiDragElements(clonesInserted, rootEl) {
583-
multiDragElements.forEach(multiDragElement => {
583+
multiDragElements.forEach((multiDragElement, i) => {
584584
let target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];
585585
if (target) {
586586
rootEl.insertBefore(multiDragElement, target);
@@ -596,7 +596,7 @@ function insertMultiDragElements(clonesInserted, rootEl) {
596596
* @param {HTMLElement} rootEl
597597
*/
598598
function insertMultiDragClones(elementsInserted, rootEl) {
599-
multiDragClones.forEach(clone => {
599+
multiDragClones.forEach((clone, i) => {
600600
let target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];
601601
if (target) {
602602
rootEl.insertBefore(clone, target);

0 commit comments

Comments
 (0)