routes/scenes.js update function line 343 - 376. An error exists in deletion of objects -
for(var i = _scene.assets.length-1; i>=_scene.assets.length-diff; i--){}
Is not actually relevant because the index order of the objects is askew, _scene.assets array contain and object {key: value}. Rather than removing the last items in the array we need to remove the items whose key is >= _scene.assets.length-diff. In this case we'll need to iterate through the objects and determine if the item is a candidate for deletion.
routes/scenes.js update function line 343 - 376. An error exists in deletion of objects -
Is not actually relevant because the index order of the objects is askew, _scene.assets array contain and object {key: value}. Rather than removing the last items in the array we need to remove the items whose key is >= _scene.assets.length-diff. In this case we'll need to iterate through the objects and determine if the item is a candidate for deletion.