Use the element itself instead of one earlier
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Peter Stuifzand 2020-10-29 23:13:57 +01:00
parent ae857feb72
commit 252d877f1c

View File

@ -116,8 +116,7 @@ function Store(inputData) {
*/ */
function insertBefore(beforeId, item) { function insertBefore(beforeId, item) {
let index = _.findIndex(idList, (id) => id === beforeId) let index = _.findIndex(idList, (id) => id === beforeId)
let indent = values[idList[index - 1]].indented item.indented = values[idList[index]].indented
item.indented = indent
let id = item.id let id = item.id
if (!id) { if (!id) {
let newId = ID() let newId = ID()