From f134eae57d364fbd8f719d06c202d88697a9b69b Mon Sep 17 00:00:00 2001 From: joeuhren <46763106+joeuhren@users.noreply.github.com> Date: Sun, 22 Nov 2020 20:40:15 -0700 Subject: [PATCH] Fix error reading "last" property during reindex --- lib/database.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/database.js b/lib/database.js index 48c55cb..bd6490c 100644 --- a/lib/database.js +++ b/lib/database.js @@ -336,6 +336,7 @@ module.exports = { create_stats: function(coin, cb) { var newStats = new Stats({ coin: coin, + last: 0 }); newStats.save(function(err) { @@ -782,6 +783,9 @@ module.exports = { }, { new: true }, function(err, new_stats) { + if(err) { + console.log("Error during Stats Update:", err); + } return cb({coin: coin, count : count, supply: supply,