diff --git a/list-editor/store.js b/list-editor/store.js index 1ed3b87..1c1ecd2 100644 --- a/list-editor/store.js +++ b/list-editor/store.js @@ -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()