moved ordering before delete

This commit is contained in:
cubedro 2015-05-27 12:22:17 +03:00
parent 305f90d536
commit 1c1303f87a
1 changed files with 2 additions and 2 deletions

View File

@ -109,12 +109,12 @@ History.prototype._save = function(block)
{
this._items.unshift(block);
this._items = _.sortByOrder( this._items, 'height', false );
if(this._items.length > MAX_HISTORY)
{
this._items.pop();
}
this._items = _.sortByOrder( this._items, 'height', false );
}
History.prototype.search = function(number)