Merge branch 'feature/fxcmd' into release/5.4.1
Showing
1 changed file
with
7 additions
and
2 deletions
@@ -373,8 +373,13 @@ exports.selectAddress = (req, res, next) => { | @@ -373,8 +373,13 @@ exports.selectAddress = (req, res, next) => { | ||
373 | */ | 373 | */ |
374 | exports.invoiceInfo = (req, res, next) => { | 374 | exports.invoiceInfo = (req, res, next) => { |
375 | let uid = req.user.uid; | 375 | let uid = req.user.uid; |
376 | - let cookieData = req.cookies['order-info']; | ||
377 | - let orderInfo = JSON.parse(cookieData); | 376 | + let orderInfo; |
377 | + | ||
378 | + try { | ||
379 | + orderInfo = JSON.parse(req.cookies['order-info']); | ||
380 | + } catch (e) { | ||
381 | + orderInfo = {}; | ||
382 | + } | ||
378 | 383 | ||
379 | co(function* () { | 384 | co(function* () { |
380 | let userData = yield userModel.queryProfile(uid); | 385 | let userData = yield userModel.queryProfile(uid); |
-
Please register or login to post a comment