From dcd1d2ada1bc3f30f62110d5a5766cf7c169d142 Mon Sep 17 00:00:00 2001 From: chaosBreaking Date: Sun, 29 Sep 2019 13:27:33 +0800 Subject: [PATCH] fix:fix --- src/modules/fund/fund.controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/fund/fund.controller.js b/src/modules/fund/fund.controller.js index b48df50..79b334f 100644 --- a/src/modules/fund/fund.controller.js +++ b/src/modules/fund/fund.controller.js @@ -246,7 +246,7 @@ module.exports = { } }); } - const [newFund, actions] = await Promise.all([ + let [newFund, actions] = await Promise.all([ fund.addFund(list, { inviter }), Action.find({ userId, type: 1, createdAt: { $gt: start, $lt: now } }) ]); @@ -254,6 +254,7 @@ module.exports = { let revenueLastday = calRevenueLastday(actions); // 筛选有效矿晶 let activeFund = getActiveFund(fund.fundList); + if (!newFund || !newFund.fundList) newFund = fund; return res.json({ code: 0, msg: '刷新成功',