incredibleMachines / 30PP

Player and Uploader App for 30 Park Place
0 stars 0 forks source link

Scenes Update Remove #53

Closed piuggi closed 10 years ago

piuggi commented 10 years ago

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.

piuggi commented 10 years ago

Deprecated this functionality, no longer a bug!