From f3163cd81fee69ac99dc89ed84f1c8fc0180bb91 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sun, 6 Feb 2022 11:06:54 +0100 Subject: [PATCH] Update sorter --- src/utils/Sorter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/Sorter.js b/src/utils/Sorter.js index 024e01816..3313ca3c2 100644 --- a/src/utils/Sorter.js +++ b/src/utils/Sorter.js @@ -1068,12 +1068,12 @@ export default Backbone.View.extend({ const isTextable = this.isTextableActive(srcModel, trgModel); if (!dropContent) { - const srcIndex = srcModel.index(); + const srcIndex = srcModel.collection.indexOf(srcModel); const sameCollection = targetCollection === srcModel.collection; const sameIndex = srcIndex === index || srcIndex === index - 1; const canRemove = !sameCollection || !sameIndex || isTextable; - if (canRemove && srcModel.collection) { + if (canRemove) { modelToDrop = srcModel.collection.remove(srcModel, { temporary: true }); } } else {