From 44312f624ffdad8ae2ad72a90985acdca6e112ad Mon Sep 17 00:00:00 2001 From: kimi360 Date: Sun, 19 Apr 2020 18:49:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=9C=8B=E9=9B=AA=E6=97=A0Topic?= =?UTF-8?q?=E5=8F=AA=E8=8E=B7=E5=8F=96=E7=B2=BE=E5=8D=8E=E5=B8=96=E6=8A=A5?= =?UTF-8?q?=E9=94=99=20(#4474)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/pediy/topic.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/pediy/topic.js b/lib/routes/pediy/topic.js index 01f39d9cd..4cef0e8d6 100644 --- a/lib/routes/pediy/topic.js +++ b/lib/routes/pediy/topic.js @@ -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');