提交 705fb322 编写于 作者: D David Beljan 提交者: owen-m1

Fixed missing forEach indexes + Fixed CircleCI Config

上级 caf3e127
......@@ -21,11 +21,12 @@ jobs:
- run: npm run build:umd
- run:
name: Compatibility Test
command: |
if [ -z "$CIRCLE_PR_NUMBER" ]; then
npm run test:compat
fi
name: Compatibility Test
command: |
if [ -z "$CIRCLE_PR_NUMBER" ];
then
npm run test:compat
fi
- run: npm run test
- store_test_results:
......
......@@ -580,7 +580,7 @@ function MultiDragPlugin() {
}
function insertMultiDragElements(clonesInserted, rootEl) {
multiDragElements.forEach(multiDragElement => {
multiDragElements.forEach((multiDragElement, i) => {
let target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];
if (target) {
rootEl.insertBefore(multiDragElement, target);
......@@ -596,7 +596,7 @@ function insertMultiDragElements(clonesInserted, rootEl) {
* @param {HTMLElement} rootEl
*/
function insertMultiDragClones(elementsInserted, rootEl) {
multiDragClones.forEach(clone => {
multiDragClones.forEach((clone, i) => {
let target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];
if (target) {
rootEl.insertBefore(clone, target);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册