From c113629b8c9739c818742cd0b6d26cb3278a5b5f Mon Sep 17 00:00:00 2001 From: Bingo <21344290@qq.com> Date: Fri, 21 Aug 2020 15:02:47 +0800 Subject: [PATCH] fix item sort. --- lib/history.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/history.js b/lib/history.js index a60123e..e2bce40 100644 --- a/lib/history.js +++ b/lib/history.js @@ -228,7 +228,7 @@ History.prototype._save = function(block) { this._items.unshift(block); - this._items = _.sortBy( this._items, 'height', false ); + this._items = _.orderBy( this._items, 'height', "desc" ); if(this._items.length > MAX_HISTORY) {