fix: 看雪无Topic只获取精华帖报错 (#4474)

This commit is contained in:
kimi360 2020-04-19 18:49:40 +08:00 committed by GitHub
parent 97473dae5c
commit 44312f624f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ module.exports = async (ctx) => {
item = $(item);
const src = item.attr('src');
if (!src.startsWith('https://') && !src.startsWith('http://')) {
if (typeof src !== 'undefined' && !src.startsWith('https://') && !src.startsWith('http://')) {
item.attr('src', `https://bbs.pediy.com/${src}`);
}
item.attr('referrerpolicy', 'no-referrer');