修复了异常报错

This commit is contained in:
doramart 2015-08-20 08:16:55 +08:00
parent 32f67eda11
commit 1a8e524e75

View File

@ -37,10 +37,12 @@ function queryCatePage(req, res,folder,cateId){
if(temp == 'blog'){ if(temp == 'blog'){
isDetail = false; isDetail = false;
} }
var cateIdKey = new RegExp(result._id, 'i');
var q = {'sortPath' : { $regex: cateIdKey }}; var q = {'sortPath' : { $regex: cateIdKey }};
var params = url.parse(req.url,true); var params = url.parse(req.url,true);
if(params){ if(params){
var cateIdKey = new RegExp(result._id, 'i');
var sort = params.query.sort; var sort = params.query.sort;
var time = Number(params.query.time); var time = Number(params.query.time);