Skip to content

Commit

Permalink
fix: banyuetan null error (#2708)
Browse files Browse the repository at this point in the history
  • Loading branch information
kt286 authored and DIYgod committed Jul 28, 2019
1 parent 80ba963 commit 76cb734
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/routes/banyuetan/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ module.exports = async (ctx) => {
const response = await got.get(itemUrl);

const $ = cheerio.load(response.data);
const description = $('div.detail_content')
.html()
.trim();
const description = $('div.detail_content').html() || '文章已被删除';

const single = {
title: title,
Expand Down

0 comments on commit 76cb734

Please sign in to comment.