Fix error reading "last" property during reindex
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user