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) {
let index = _.findIndex(idList, (id) => id === beforeId)
let indent = values[idList[index - 1]].indented
item.indented = indent
item.indented = values[idList[index]].indented
let id = item.id
if (!id) {
let newId = ID()