Use the element itself instead of one earlier
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ae857feb72
commit
252d877f1c
|
@ -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()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user