Commit 50bc31e2 authored by 邓军's avatar 邓军

搜索BUG修改

parent 2f0c7a85
...@@ -256,7 +256,8 @@ router.get('/threads/list', function(req, res, next) { ...@@ -256,7 +256,8 @@ router.get('/threads/list', function(req, res, next) {
console.error(err); console.error(err);
res.json(returnCode.BUSY); res.json(returnCode.BUSY);
} else { } else {
if (results.items[0].pid) {
if (results.items.length>0 &&results.items[0].pid) {
forumThreadService.getById(results.items[0].pid, function(err, parentThread) { forumThreadService.getById(results.items[0].pid, function(err, parentThread) {
res.json(_.assign({ res.json(_.assign({
parentThread: parentThread parentThread: parentThread
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment