Merge branch 'release/wap-optim' of git.yoho.cn:fe/yohobuywap-node into release/wap-optim
Showing
1 changed file
with
1 additions
and
1 deletions
@@ -182,7 +182,7 @@ const search = (req, res, next) => { | @@ -182,7 +182,7 @@ const search = (req, res, next) => { | ||
182 | params.isApp = req.yoho.isApp; | 182 | params.isApp = req.yoho.isApp; |
183 | searchModel.getSearchData(params).then((result) => { | 183 | searchModel.getSearchData(params).then((result) => { |
184 | 184 | ||
185 | - if (parseInt(params.page) === 1 && parseInt(params.start) > 0) { | 185 | + if (result && result.list && parseInt(params.page) === 1 && parseInt(params.start) > 0) { |
186 | // 首屏渲染时,使用 'start' 参数裁减已渲染数据 | 186 | // 首屏渲染时,使用 'start' 参数裁减已渲染数据 |
187 | result.list = result.list.slice(params.start || 0); | 187 | result.list = result.list.slice(params.start || 0); |
188 | } | 188 | } |
-
Please register or login to post a comment